MySQL Loop BULK INSERT test data

Source: Internet
Author: User

DELIMITER is actually defining a statement to execute the Terminator

Delimiter in MySQL:

Http://blog.sina.com.cn/s/blog_4c197d420101d3oa.html




1: Define Stored Procedure drop PROCEDURE test_insert;D elimiter $$//define Terminator Create PROCEDURE Test_insert () BEGIN DECLARE i INT DEFAULT 0     ;    START TRANSACTION;      While i<1000 does INSERT into T_user (column1,column2,column3) VALUES (Uuid_short (), I, ' test data ');     SET i=i+1;     END while; COMMIT;  END $ $DELIMITER; The Terminator is changed to; 2: Execute Stored procedure call Test_insert ();


This article is from the "Nothing-skywalker" blog, please be sure to keep this source http://tianxingzhe.blog.51cto.com/3390077/1676097

MySQL Loop BULK INSERT test data

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.