开发者

how to send multiple row to mysql at same time(like bulk copy)?

开发者 https://www.devze.com 2022-12-30 08:39 出处:网络
I am using asp.net + Mysql. I have multiple rows i开发者_如何学编程n my dataset; I have to store the rows in my database table. How to do that?Use the insert statement ..

I am using asp.net + Mysql.

I have multiple rows i开发者_如何学编程n my dataset; I have to store the rows in my database table. How to do that?


Use the insert statement ..

INSERT INTO tbl_name (a,b,c) VALUES(1,2,3),(4,5,6),(7,8,9);

this inserts 3 rows

a | b | c
--+---+--
1 | 2 | 3
4 | 5 | 6 
7 | 8 | 9

see http://dev.mysql.com/doc/refman/5.1/en/insert.html

0

精彩评论

暂无评论...
验证码 换一张
取 消