我有两张桌子自行车和车。
自行车桌
bikeID | name |desc
车牌
carID | name | desc.
我需要将两个表合并为一个这样的
bikeID | carID | name | desc
答案 0 :(得分:0)
如果我说得对,请尝试使用UNION
SELECT * INTO NEW_TABLEN_NAME FROM
(
SELECT BikeId, NULL as CarID, name,desc FROM Bike
UNION ALL
SELECT NULL as BikeId, CarID, name,desc FROM Car
) T