时间:2021-07-01 10:21:17 帮助过:17人阅读
update tb_User set pass = ‘‘-- 此处pass前不要加 tb_User 别名usr from tb_User usr inner join tb_Address addr on usr.nAddressFK = addr.nAddressID where usr.id=123
MySql
UPDATE mem_world AS mw1 INNER JOIN mem_world AS mw2 ON mw1.parentid = mw2.wid SET mw1.level = mw2.level WHERE mw2.baseid = 107 AND mw2.parentid = 0 AND mw2.size > 1;
一个是先set再关联,另外一个是先关联再set。
Sql Server 与 MySql 在使用 update inner join 时的区别
标签:address size mem res eid -- sid sql 别名