循環向Oracle插入測試數據
declare i integer;
begin
for i in 1..10000
loop
insert into trn_pfms_tusers
(userid, loginname, username, password, imagepath, accountstatus, birthdate, gender, title, minzu, idnumber, maritalstatus, education, address, zipcode, homephone, employeenumber, departmentname, reportsto, email, officephone, cellphone, facsimile, note, creator, createtime, lastmodifier, lastmodifytime)
values
(i+5000, 'test'||i, 'test', '123',null, 1, null, 1, 'PM', null, '100'||i, null, null, null, null, null, '100'||i, 'AB'||i, 'Hello', 'aa@aa.com'||i, null, null, null, null, null, sysdate, null, null);
end loop;
end;
begin
for i in 1..10000
loop
insert into trn_pfms_tusers
(userid, loginname, username, password, imagepath, accountstatus, birthdate, gender, title, minzu, idnumber, maritalstatus, education, address, zipcode, homephone, employeenumber, departmentname, reportsto, email, officephone, cellphone, facsimile, note, creator, createtime, lastmodifier, lastmodifytime)
values
(i+5000, 'test'||i, 'test', '123',null, 1, null, 1, 'PM', null, '100'||i, null, null, null, null, null, '100'||i, 'AB'||i, 'Hello', 'aa@aa.com'||i, null, null, null, null, null, sysdate, null, null);
end loop;
end;
posted on 2007-07-29 16:19 MingIsMe 閱讀(122) 評論(0) 編輯 收藏 所屬分類: 10 Database