oracle 一张表插入另外一张表 存储过程
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                oracle 一张表插入另外一张表  存储过程
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.                        
                                ?
?
----創建存儲過程 create or replace procedure inserttest ascursor cs isselect id, name, cla, addr, phone, tel, x, y, shape, objectidfrom hotel_bak t2; beginfor c in cs loopBEGINinsert into hotel(id, name, cla, addr, phone, tel, x, y, shape, objectid)values((select max(id) + 1 from hotel),c.name,c.cla,c.addr,c.phone,c.tel,c.x,c.y,c.shape,(select max(objectid) + 1 from hotel));END;end loop; end inserttest;---執行存儲過程 call inserttest();commit;?
轉載于:https://www.cnblogs.com/tianciliangen/p/4980211.html
總結
以上是生活随笔為你收集整理的oracle 一张表插入另外一张表 存储过程的全部內容,希望文章能夠幫你解決所遇到的問題。
 
                            
                        - 上一篇: thinkPHP增删改查的方法案例
- 下一篇: MySQL查询本周、上周、本月、上个月份
