全部博文(2065)
分类: Mysql/postgreSQL
2009-11-13 10:31:50
hkebao2010-02-04 18:03:41
delimiter // create procedure load_no_part() begin declare v int default 0; declare init datetime; declare b int default 0; set init = now(); while v<20 do loop1: LOOP set b=b+1; if b>10 then leave loop1; end if; insert into no_part_table values('2009-01-02',b,date_add(init,interval v hour),b); END LOOP loop1; set v=v+1; end while; end //