declare
nu_time number(10) :=3;
se_nub number(10) :=300000;
buy_da date;
begin
buy_da := to_date('2010-7-9 14:53:15', 'yyyy-MM-dd hh24:mi:ss');
while (nu_time <= 7) loop
insert into se_sale_elec(sale_elec_id,card_id,buy_times,buy_money,buy_date,operor,oper_date)
select se_nub, 3423, nu_time, 10, buy_da, 10000001, buy_da from se_cons_card c,se_sale_elec s,se_cons_card d where c.cons_no = d.cons_no and d.cons_card_id = s.card_id and c.cons_no = '3210089992';
nu_time := nu_time + 1;
se_nub := se_nub + 1;
buy_da := buy_da + 1/24;
end loop;
end;