iT邦幫忙

0

PL/SQL如何寫

A_TABLE(學號,姓名) , B_TABLE(學號,名稱,...)
請問PL/SQL要如何寫才能將 A.姓名 寫入 B.名稱 WHERE B.學號=A.學號

圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 個回答

5
尼克
iT邦大師 1 級 ‧ 2012-08-08 18:11:28
最佳解答

update (
select a.fileld, b.fileld
from TABLEA a, TABLE b
where
a.key = b.key
) set fileld = fileld

joy036 iT邦研究生 3 級 ‧ 2012-08-09 09:38:49 檢舉

請問是
update ( select a.學號,b.姓名 from TABLE_B a, TABLE_A b
where a.學號=b.學號(+) )
set a.名稱=b.姓名
怎麼出現 ORA-00918

ORA-00918 通常指的是定義不清楚欄位. 你的 "set a.名稱=b.姓名" 在上面好像沒有出現過a.名稱...

我要發表回答

立即登入回答