我有3张桌子:
vehicle, line, brands.
我需要将车辆的值插入新表vehicleNew
,问题是表vehicle
包含这些列vehicleId, lineName, brandsName
新表vehicleNew
有vehicleId, lineCode, brandsCode
如何插入值?
答案 0 :(得分:1)
insert into vehicleNew(vehicleId, lineCode, brandsCode)
select vehicleId, lineName, brandsName from vehicle