UPDATE之WHERE问题?
表T1,T2现在想修改T2中的HM字段,但得以T1的zh为条件,下面是偶写得语句,但是行不通。(t1与t2之间用khh做关联)
sql "update t2 set hm='张三' where t1='20001001' and t2.khh=t1.khh"
提示217:column (khzhglb) not found in any table in the query .........
请大家帮着修改一下语句。。谢谢了。 update t2 set hm=(select zh from t1 where t2.khh=t1.khh and t1='20001001' )
这样可以不? 二楼的真搞笑!
update t2 set hm='zhang3' where khh in (selectt1.khh from t1 where t1.column='20001001');
页:
[1]