当前位置: 代码迷 >> Oracle管理 >> 正在学习oracle,书下有个update的语法不懂,求指点
  详细解决方案

正在学习oracle,书下有个update的语法不懂,求指点

热度:85   发布时间:2016-04-24 05:12:19.0
正在学习oracle,书上有个update的语法不懂,求指点
《PL/SQL宝典》 Page85
update <table_or_view_name>
set column_name = {expression | default | null} [,...n]
from <table_source>
where <search_condition>
---------------------------------------------

---------------------------------------------
我想用该语法将aaupdate1更新为
FILENO FILECONTENT
------ -----------
  1 the1-
  2 the2
  3 the3

------解决方案--------------------
oracle不支持双重from 这样写

SQL code
update aaupdate1 t1 set filecontent = (select filecontent from aaupdate2 t2 where t1.fileno=t2.fileno)
  相关解决方案