=============错误例子=======================================

update tcodeLocation
set plocationid = p.LocationID
from TcodeLocation t , tcodelocation p where p.locationcode=t.plocationcode 
and t.locationlevel>1 

 

=============正确=======================================

 

update t    ---  (使用别名)
set plocationid = p.LocationID
from TcodeLocation t , tcodelocation p where p.locationcode=t.plocationcode
and t.locationlevel>1

相关文章: