难。想了一天了。大牛请进。# Database - 数据库
P*M
1 楼
How to make the table t3 from data from t1 and t2?
table: t1
+------+------+
| a | b |
+------+------+
| 1 | a |
| 2 | aa |
+------+------+
table:t2;
+------+------+
| a | b |
+------+------+
| 1 | b |
| 3 | bb |
+------+------+
t3: summary table
+------+------+-------+
| a | b1 |b2 |
+------+------+-------+
| 1 | a |b |
| 2 | aa |null |
| 3 | null |bb |
+------+------+-------+
where b1 corresponding to a.[b]
b2 corresponding to
table: t1
+------+------+
| a | b |
+------+------+
| 1 | a |
| 2 | aa |
+------+------+
table:t2;
+------+------+
| a | b |
+------+------+
| 1 | b |
| 3 | bb |
+------+------+
t3: summary table
+------+------+-------+
| a | b1 |b2 |
+------+------+-------+
| 1 | a |b |
| 2 | aa |null |
| 3 | null |bb |
+------+------+-------+
where b1 corresponding to a.[b]
b2 corresponding to