我正在使用 mysql,我有三个表 T1、T2、T3,它们包含如下数据:
+-------+
| t1.id |
+-------+
| 1 |
| 2 |
| 3 |
| 4 |
| 5 |
+------+
+-------+
| t2.id |
+-------+
| 1 |
| 2 |
| 3 |
| 4 |
+-------+
+-------+
| t3.id |
+-------+
| 1 |
| 2 |
| 3 |
+-------+
I want to be able to select data as follows:
id t1.id t2.id t3.id
1 1 1 1
2 2 2 2
3 3 3 3
4 4 4 null
5 5 null null
我怎样才能做到这一点?