-7
我想使用連接操作從多個表中檢索記錄。使用連接從多個表中檢索記錄
請參見下面是我的表:
Table Name : country
+--------+-------------
| Field | Type
+--------+-------------
| c_id | int(5)
| c_name | varchar(30)
+--------+-------------
Table Name : company
+----------+-------------+
| Field | Type |
+----------+-------------+
| c_id | int(5) |
| com_id | int(5) |
| com_name | varchar(30) |
+----------+-------------+
Table Name : branch
+----------+-------------+
| Field | Type |
+----------+-------------+
| com_id | int(5) |
| b_id | int(5) |
| b_name | varchar(30)|
| com_name | varchar(20)|
+----------+-------------+
我的結果應該是像波紋管:
+-------------+-------------+-------------+-------------+
| com_name | c_name | b_id | b_name |
+-------------+-------------+-------------+-------------+
請幫我......
那麼關於MySQL或SQL-Server呢? – msrd0 2014-10-19 14:56:52