一 Oracle 循环插入测试数据 declare maxrecords constant int:=1000; i int :=1; begin for i in 1..maxrecords loop insert into UserInfo(UserID,login,password,firstName,lastName,ISADMINISTRATOR) values(SYS_GUID(),TO_CHAR('9999'+i),'password','fri…
实验中经常会遇到需要多条数据的情况就想到了用SQL语句循环生成数据 DROP PROCEDURE if EXISTS test_insert; DELIMITER ;; CREATE PROCEDURE test_insert() BEGIN DECLARE y BIGINT DEFAULT 1; WHILE y<100000 DO INSERT INTO `sshshop`.`product` (`pname`, `market_price`, `shop_price`, `image`, `…
1.创建数据库Person CREATE TABLE Person( id number, name nvarchar2() , age number , sex nvarchar2() , password nvarchar2() ) 2.在数据库建立一个type,对应JAVA端要传入的对象结构: CREATE OR REPLACE TYPE BUT_UKBNOV_CTC_ORDER_REC1 AS OBJECT ( id number, name nvarchar2(200) , age n…