db2 存储过程
-- 创建存储过程 BEGIN DECLARE i INTEGER DEFAULT 1; WHILE i <= 10000 DO INSERT INTO IKAS.ALAMDEFAULT (UID1, UID2, UID3, INT, VARCHARNOTNULL, "DOUBLE", "NULL", CREATETIME, INSERTTIME, DEFAULTABC) VALUES(i, i, i, i, '1', NULL, NULL, CURRENT TIMESTAMP, NULL, NULL); UPDATE IKAS.ALAMDEFAULT SET INSERTTIME = CURRENT TIMESTAMP WHERE UID1=i; SET i = i + 1; END WHILE; END; DELETE FROM (SELECT * FROM IKAS.ALAMDEFAULT) SELECT count(1) FROM IKAS.ALAMDEFAULT