首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > oracle >

ORA-00904

2014-01-28 
table ta,tb updateta tset t.sal100 wheret.nametb.name andtb.page1000 为什么执行的时候出错误 O

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')
------解决方法--------------------------------------------------------
探讨
SQL codeupdate ta t
set sal = '100'
where exists(select 1 from tb where name= t.name and page='1000')

------解决方法--------------------------------------------------------
1楼的sql正确  是只更新ta阿
------解决方法--------------------------------------------------------
探讨
SQL codeupdateta tsetsal='100'where exists(select1fromtbwherename=t.nameandpage='1000')

------解决方法--------------------------------------------------------
楼上的就正确,你要是不放心就用我这个,绝对唯一!
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');
        

热点排行