亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

關于PLSQL循環導入數據的問題

代碼如下:
begin
?for c in (select * from test_student) loop
? ?update test_student t
? ? ? set t.stuname =
? ? ? ? ? (select *
? ? ? ? ? ? ?from (select xingshi || hzb1
? ? ? ? ? ? ? ? ? ? ?from test_hanzibiao
? ? ? ? ? ? ? ? ? ? order by dbms_random.value)
? ? ? ? ? ? where rownum = 1)
?end loop;
end; ? ? ?
想實現的是:在test_student表中stuname列循環插入數據,插入的時候隨機從test_hanzibiao表中提取xingshi 和hzb1列。
現在的問題是:運行后stuname列直接所有數據都是一樣的。求幫助

正在回答

舉報

0/150
提交
取消

關于PLSQL循環導入數據的問題

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號