开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜