1.傻傻的insert
INSERT INTO raw_materials.common_picture_setting
(PICTURE_SETTING_NAME,PICTURE_SETTING_URL,PICTURE_SETTING_TYPE,PICTURE_SETTING_ENABLED,PICTURE_SETTING_EXPLAIN,PLATFORM_TYPE)
VALUES
('LOGO-v3','https://gss2.bdstatic.com/-fo3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike150%2C5%2C5%2C150%2C50/sign=5ad4d0a4c5bf6c81e33a24badd57da50/9345d688d43f879462947ce2db1b0ef41ad53a96.jpg',2,1,'广告位轮播图5张(默认图)',NULL),
('LOGO-v3','https://gss2.bdstatic.com/-fo3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike150%2C5%2C5%2C150%2C50/sign=5ad4d0a4c5bf6c81e33a24badd57da50/9345d688d43f879462947ce2db1b0ef41ad53a96.jpg',2,1,'广告位轮播图5张(默认图)',NULL),
('LOGO-v3','https://gss2.bdstatic.com/-fo3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike150%2C5%2C5%2C150%2C50/sign=5ad4d0a4c5bf6c81e33a24badd57da50/9345d688d43f879462947ce2db1b0ef41ad53a96.jpg',2,1,'广告位轮播图5张(默认图)',NULL),
('LOGO-v3','https://gss2.bdstatic.com/-fo3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike150%2C5%2C5%2C150%2C50/sign=5ad4d0a4c5bf6c81e33a24badd57da50/9345d688d43f879462947ce2db1b0ef41ad53a96.jpg',2,1,'广告位轮播图5张(默认图)',NULL),
('LOGO-v3','https://gss2.bdstatic.com/-fo3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike150%2C5%2C5%2C150%2C50/sign=5ad4d0a4c5bf6c81e33a24badd57da50/9345d688d43f879462947ce2db1b0ef41ad53a96.jpg',2,1,'广告位轮播图5张(默认图)',NULL),
('LOGO-v3','https://gss2.bdstatic.com/-fo3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike150%2C5%2C5%2C150%2C50/sign=5ad4d0a4c5bf6c81e33a24badd57da50/9345d688d43f879462947ce2db1b0ef41ad53a96.jpg',2,1,'广告位轮播图5张(默认图)',NULL)
2.使用一个存储过程
DELIMITER //
CREATE PROCEDURE INIT_DEMO300_DATA()
BEGIN
DECLARE n int DEFAULT 0;
WHILE(n<=300) DO
INSERT INTO raw_materials.common_picture_setting
(PICTURE_SETTING_NAME,PICTURE_SETTING_URL,PICTURE_SETTING_TYPE,PICTURE_SETTING_ENABLED,PICTURE_SETTING_EXPLAIN,PLATFORM_TYPE)
VALUES
('LOGO-v3','https://gss2.bdstatic.com/-fo3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike150%2C5%2C5%2C150%2C50/sign=5ad4d0a4c5bf6c81e33a24badd57da50/9345d688d43f879462947ce2db1b0ef41ad53a96.jpg',2,1,'广告位轮播图5张(默认图)',NULL);
set n = n + 1;
END WHILE;
END //
DELIMITER ;
call INIT_DEMO300_DATA();