表:
mysql> select * from table1;
+------+------+------+
| no | nm | unit |
+------+------+------+
| 1 | ABC | 10 |
| 2 | ACX | 20 |
| 3 | AYU | 30 |
+------+------+------+
3 rows in set (0.01 sec)
mysql> select * from table2;
+------+------+------+
| no | nm | unit |
+------+------+------+
| 1 | ABC | 40 |
| 2 | ACX | 20 |
+------+------+------+
2 rows in set (0.00 sec)
所需输出:
mysql> select * from table2;
+------+------+------+
| no | nm | unit |
+------+------+------+
| 1 | ABC | 50 |
| 2 | ACX | 40 |
| 3 | AYU | 30 |
+------+------+------+
3 rows in set (0.00 sec)