17,140
社区成员




for rec in (select * from store) loop
insert into download values (rec.storecode,sysdate,'normal','sysdba');
end loop;
commit;
insert into download
select storecode, sysdate, 'normal', 'sysdba'
from store b
where not exists
(select 1 from download a where b.storecode = a.storecode)
当然你也可以用function,可以使用游标循环