<meta http-equiv="X-UA-Compatible" content="IE=9"></meta>
我觉得令人沮丧的是我可以简单地更改表名以重新使用简单的查询
因为我无法将我的表重新命名为T1或T2,所以新查询难以遵循。 personnaly我希望我能留在mySQL上。
UPDATE stock.tbldesk_inv As T1
inner JOIN stock.deskinvfix AS T2 ON T1.serial_number = T2.SN
SET T1.location = T2.Location,
T1.asset_number = T2.AssNumber,
T1.department = T2.dept,
T1.status = T2.Status,
T1.first_name = T2.firstn,
T1.last_name = T2.lastn;
DELETE FROM stock.deskinvfix;
SELECT * FROM stock.deskinvfix;
谁能告诉我为什么SQL服务器不喜欢我正在使用的mySQL查询?
答案 0 :(得分:0)
这应该有用......
UPDATE T1
SET T1.ComputerName = T2.SCCMName
FROM Hardware_Inventory as T1
INNER JOIN updatepcname as T2 ON T1.SerialNumber = T2.SCCMSerial
诺尔