日期:2014-05-17  浏览次数:20711 次

正在学习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)