回答編集履歴
4
追加
test
CHANGED
@@ -71,3 +71,17 @@
|
|
71
71
|
6 rows in set (0.00 sec)
|
72
72
|
|
73
73
|
```
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
SqlServerもFULL JOINができました。
|
78
|
+
|
79
|
+
```sql
|
80
|
+
|
81
|
+
<SqlServer>
|
82
|
+
|
83
|
+
select a.no, b.no from tbl_a a full join tbl_b b on a.no=b.no;
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
```
|
3
変更
test
CHANGED
File without changes
|
2
変更
test
CHANGED
@@ -2,7 +2,9 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
+
```
|
6
|
+
|
5
|
-
|
7
|
+
<postgres>
|
6
8
|
|
7
9
|
insert into tbl_a values (100), (101), (200),(201);
|
8
10
|
|
@@ -36,7 +38,9 @@
|
|
36
38
|
|
37
39
|
|
38
40
|
|
41
|
+
```
|
42
|
+
|
39
|
-
|
43
|
+
<mysql>
|
40
44
|
|
41
45
|
select a.no, b.no from tbl_a a left join tbl_b b using(no)
|
42
46
|
|
1
修正
test
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
-
```s
|
5
|
+
```postgres
|
6
6
|
|
7
7
|
insert into tbl_a values (100), (101), (200),(201);
|
8
8
|
|
@@ -31,3 +31,39 @@
|
|
31
31
|
|
32
32
|
|
33
33
|
```
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
```mysql
|
40
|
+
|
41
|
+
select a.no, b.no from tbl_a a left join tbl_b b using(no)
|
42
|
+
|
43
|
+
union
|
44
|
+
|
45
|
+
select a.no, b.no from tbl_a a right join tbl_b b using(no);
|
46
|
+
|
47
|
+
+------+------+
|
48
|
+
|
49
|
+
| no | no |
|
50
|
+
|
51
|
+
+------+------+
|
52
|
+
|
53
|
+
| 100 | 100 |
|
54
|
+
|
55
|
+
| 101 | 101 |
|
56
|
+
|
57
|
+
| 200 | NULL |
|
58
|
+
|
59
|
+
| 201 | NULL |
|
60
|
+
|
61
|
+
| NULL | 300 |
|
62
|
+
|
63
|
+
| NULL | 301 |
|
64
|
+
|
65
|
+
+------+------+
|
66
|
+
|
67
|
+
6 rows in set (0.00 sec)
|
68
|
+
|
69
|
+
```
|