帮忙写句游标
有两个表A,B每个表大约40万条数据             
 A表 
 ID      NAME      JOB       
 :            :               :   
 B表 
 BID      AID         SCO      AJOB 
 :               :               :            :     
 B表中含有部分A表数据      现在要取A表中B表不存在的(AID,AJOB)数据   逐条插入表c   
 当然条件是   AID,BID   要相对应即   B.AID=A.ID         麻烦各位大侠帮我写个游标实现    
 在下新手      谢谢            oracle      pl/sql
------解决方案--------------------不要用游标啊 
 查询就可以了 
 insert into c 
 (select *  
   from a  
  where a.id in( select id from a 
                 minus   
                 select distinct(aid) from b)        
------解决方案--------------------insert into c 
 (select *  
   from a ,b 
  where a.id NOT EXISTS ( select aid from b) 
 and b.aid=a.id