sql server 数据更新语句示例
-- 关联查询更新 MSSQL 和 MySQL 不同
-- MSSQL
UPDATE a SET WtNo=b.NO from Task a INNER JOIN WT_Information b ON a.WtId=b.ID;
-- MySQL
UPDATE Task a INNER JOIN WT_Information b ON a.WtId=b.ID SET WtNo=b.NO;
-- 分表查询更新 update a set a.ProjectID=b.ProjectID from
[NoticeSubkey] a,[Project_Projects] b
where a.ParentProjectID=b.ParentProjectID and a.zt=2