oracle long raw表复制

复制一个含有LONG RAW字段的表 oracle 对LONG RAW 类型的字段数据从一个表搬到另一个表中

  1. create or replace procedure sp_del_dw (   
  2. TY char ,   
  3. TId char ,   
  4. LReason char )   
  5. is  
  6. graph long raw;   
  7. begin  
  8. select photo into graph    
  9.       from Dweller    
  10.       where TempYear=TY and TempId=TId;   
  11.   
  12. insert into CancelDweller (   
  13. ID,   
  14.        Name,   
  15. Sex,   
  16. Birthday,   
  17. Education,   
  18. Marriage,   
  19. Alias,   
  20.        )   
  21.    select * from view_dw     
  22.       where TempYear=TY and TempId=TId;   
  23.   
  24. update CancelDweller    
  25.    set Photo=graph   
  26.    where TempYear=TY and TempId=TId;   
  27.   
  28. delete dweller where TempYear=TY and TempId=TId; -- delete the taker the same time   
  29. commit;   
  30.   
  31. end sp_del_dw;   
  32. /  
  1. da shang
    donate-alipay
               donate-weixin weixinpay

发表评论↓↓