关于 update别名 与update select

 

正确写法:  update  别名 set 别名点字段 =xxxx

 

UPDATE 
  a 
SET
  a.StandardID = 
  (SELECT 
    b.StandardID 
  FROM
    SurgeryMappingRecycle b,
    SurgeryMappingHistory c 
  WHERE a.ID = b.ID) 
FROM
  SurgeryMappingHistory a 

 

错误写法:

update table1 a set a.ID='1' 

 

posted @ 2015-09-08 13:20  xiaoshi657  阅读(906)  评论(0编辑  收藏  举报