質問編集履歴
2
追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -29,7 +29,8 @@
|
|
29
29
|
```
|
30
30
|
select coalesce(reg_name, '無名ユーザ') || 'は'
|
31
31
|
|| coalesce(typ, 'タイプ未定') || 'ユーザです' as ansswer_text
|
32
|
+
from t_user
|
32
|
-
|
33
|
+
where kaiin_no = 1009;
|
33
34
|
```
|
34
35
|
|
35
36
|
書き方3
|
1
追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -9,5 +9,34 @@
|
|
9
9
|
from t_user where kaiin_no = 1009;
|
10
10
|
```
|
11
11
|
現在、学習している本では、この通りのコードが書いてあり、自分でもこの改行で良いと思うのですが、
|
12
|
-
どのように改行したら、
|
12
|
+
どのように改行したら、見やすいと思いますでしょうか?
|
13
|
-
初学者で申し訳ありません。
|
13
|
+
初学者で申し訳ありません。
|
14
|
+
|
15
|
+
##補足
|
16
|
+
|
17
|
+
3つの書き方のうち、どれが見やすいと感じるかアドバイスをお願い致します。
|
18
|
+
|
19
|
+
書き方1
|
20
|
+
```
|
21
|
+
select coalesce(reg_name, '無名ユーザ') || 'は' ||
|
22
|
+
coalesce(typ , 'タイプ未定') || 'ユーザです' as ansswer_text
|
23
|
+
from t_user
|
24
|
+
where kaiin_no = 1009;
|
25
|
+
```
|
26
|
+
|
27
|
+
書き方2
|
28
|
+
|
29
|
+
```
|
30
|
+
select coalesce(reg_name, '無名ユーザ') || 'は'
|
31
|
+
|| coalesce(typ, 'タイプ未定') || 'ユーザです' as ansswer_text
|
32
|
+
from t_user where kaiin_no = 1009;
|
33
|
+
```
|
34
|
+
|
35
|
+
書き方3
|
36
|
+
```
|
37
|
+
select
|
38
|
+
coalesce(reg_name, '無名ユーザ') || 'は'
|
39
|
+
|| coalesce(typ , 'タイプ未定') || 'ユーザです' as ansswer_text
|
40
|
+
from t_user
|
41
|
+
where kaiin_no = 1009;
|
42
|
+
```
|