//create table t1 //show create table t1;
CREATE TABLE `t1` ( `id` int NOT NULL AUTO_INCREMENT, `name` varchar(40) NOT NULL DEFAULT '', `author` varchar(40) NOT NULL DEFAULT '', `content` varchar(40) NOT NULL DEFAULT '', `isbn` varchar(40) NOT NULL DEFAULT '', `topic` varchar(40) NOT NULL DEFAULT '', `summary` varchar(40) NOT NULL DEFAULT '', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=78783 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ; //create store procedure DROP PROCEDURE IF EXISTS insertIntot1; DELIMITER // CREATE PROCEDURE insertIntot1() BEGIN DECLARE i INT DEFAULT 1; WHILE (i <= 1000000) DO INSERT INTO t1 (name,author,content,isbn,topic,summary) VALUES (uuid(), uuid(), uuid(),uuid(),uuid(),uuid()); SET i = i+1; END WHILE; END; // DELIMITER ; //call store procedure call insertIntot1;
标签:varchar,DEFAULT,create,sp,40,call,table,NULL From: https://www.cnblogs.com/Fred1987/p/17678123.html