create procedure p7() begin DECLARE i INT DEFAULT 1; DECLARE pid INT DEFAULT 17224; DECLARE file_id INT DEFAULT 92490; DECLARE attmnt_rel_id INT DEFAULT 104735; while i <= 10 do set pid :=pid + 1; INSERT INTO `ls_prod`(`prod_id`,`t_prod_id`,`sort_id`,`nsort_id`,`sub_nsort_id`,`global_sort`,`global_nsort`,`global_subsort`,`global_brand`,`model_id`,`party_code`,`name`,`prod_en_name`,`price`,`cash`,`inland_price`,`proxy_price`,`carriage`,`tax`,`brief`,`content`,`views`,`praise`,`buys`,`comments`,`rec_date`,`small_pic`,`use_small_pic`,`pic`,`is_commend`,`is_hot`,`status`,`modify_date`,`user_id`,`user_name`,`start_date`,`end_date`,`stocks`,`prod_type`,`key_word`,`attribute`,`parameter`,`user_parameter`,`brand_id`,`actual_stocks`,`reviewScores`,`volume`,`weight`,`transport_id`,`has_invoice`,`has_guarantee`,`after_sale_id`,`stock_counting`,`reject_promise`,`service_guarantee`,`site`,`currency`,`prod_url`,`is_for_trading`,`auxiliaryurl`,`restriction_number`,`rmb_total`,`is_lock`,`is_lock_price`,`site_status`,`rebate_code`,`rebate_url_id`,`is_quickbuy`,`meta_desc`,`meta_keyword`,`meta_title`,`is_self_support`,`release_user`,`outer_url`,`attributes`,`out_stocks`) VALUES (pid,1,138,740,NULL,NULL,NULL,NULL,NULL,'','','性能测试专用商品','Test Product 123',NULL,0.010,0.00,0.000,0.010,NULL,'','<div align=\'center\'><img alt=\'\' src=\'http://img30.360buyimg.com/jgsq-productsoa/g13/M00/11/02/rBEhVFLPtgwIAAAAAABwO86sYfoAAHzUgGjpUgAAHBT273.jpg\' class=\'err-product\'></div>',227,2,0,14,'2015-01-26 20:21:23','','','g2/M00/00/FD/CgEHc1TPmZWALA-AAAHDql751r0299.jpg','N','N',0,'2015-02-12 22:45:36','402882823a9d5e0d013a9dabe3680002','home',NULL,NULL,4,'P',NULL,NULL,'[{\"key\":\"102\",\"value\":\"保湿补水\"},{\"key\":\"103\",\"value\":\"偏干及干性\"}]',NULL,114,10,5,11.040,0.000,NULL,0,0,NULL,0,NULL,NULL,'www.amazon.com','USD','http://item.jd.com/1057746.html',1,NULL,2,NULL,1,0,0,NULL,NULL,0,NULL,NULL,NULL,0,'',NULL,NULL,NULL); SET i :=i+1; INSERT INTO `ls_img_file`(`file_id`,`product_id`,`user_name`,`file_path`,`status`,`upoad_time`,`outer_url`) VALUES (file_id,pid,'home',NULL,1,'2015-05-25 00:00:00','g2/M00/00/FD/CgEHc1TPmZWALA-AAAHDql751r0299.jpg'); SET attmnt_rel_id :=attmnt_rel_id+1; INSERT INTO `ls_attmnt_rel`(`id`,`attachment_id`,`rel_id`,`rel_object`,`seq`) VALUES (attmnt_rel_id,6364,pid,'P',0); SET i :=i+1; end while; end$
详细解决方案
mysql 批量插入进程
热度:174 发布时间:2016-05-05 16:35:29.0
相关解决方案
- mysql 简单化 or能否实现
- 请问registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister
- MySQL 5.5 Command Line Client 窗口1输密码就退出
- 请问上Linux平台上怎么搭建JDK \TOMCAT\MYSQL
- 在LINUX上配置 MySQL 开机自动 启动
- mysql 转 orocle java ssh项目一条 sql 句不通!
- 急求帮忙!mysql 【 Column count doesn't match value count 】,该怎么解决
- jsp中的注册登录系统(mysql)
- 上了个 MySQL 5.5.25 但是安装时出错了
- 求jsp博客源代码mvc+mysql,该如何解决
- java mysql 中文乱码有关问题
- 请教各位,使用PreparedStatement mysql 数据库 不回滚,盼望解答。多谢。 具体如上
- mysql Statement parameter 一 not set
- java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306,该怎么处理
- MyBatis 读取 Mysql Blob类型的SQL如何写呢
- JDBC MYSQL 驱动加载失败 JSP DAO ECLIPSE,该怎么解决
- Only a type can be imported. com.mysql.jdbc.Driver resolves to a package解决方案
- tomcat 中抛异com.mysql.jdbc.exceptions.MySQLTransactionRollbackException,该如何处理
- struts+iBatis+mysql,该如何解决
- mysql 有外键的插入解决方案
- JSP 更新 MySQL 语句时遇到异常了= =
- mysql,该如何处理
- +++++ mysql 插入成功,查询不到记录?
- MyBatis3.1.1 Insert 回到主键 long类型 MYSQL 数据库
- mysql:假若一个表中,有两个属性name和id,删除同名的保留id小的,问这样写有误吗
- java mysql where限制有关问题
- mysql 数据库,如果信息存在调出,如果不存在转到另一个jsp中解决思路
- mysql jdbc的配置解决方案
- java.lang.ClassNotFoundException:com.mysql.jdbc.Driver,该如何解决
- 救助。Mysql 的条件删除语句如何写,就是删除部门的时候,如果部门下有用户,就不能删除