table ta,tb
update ta t set t.sal='100' where t.name=tb.name
and tb.page='1000'
为什么执行的时候出错误
ORA-00904: "TB","PAGE": invalid identified
------解决方法--------------------------------------------------------
- SQL code
update ta tset sal = '100'where exists(select 1 from tb where name= t.name and page='1000')
------解决方法--------------------------------------------------------
------解决方法--------------------------------------------------------
1楼的sql正确 是只更新ta阿
------解决方法--------------------------------------------------------
------解决方法--------------------------------------------------------
楼上的就正确,你要是不放心就用我这个,绝对唯一!
update ta t
set t.sal = '100'
where t.rowid in (select ta.rowid
from ta, tb
where ta.name = tb.name
and tb.page = '1000');