Is it possible to insert multiple rows at a time in an SQLite database?

Posted by Andrew on Stack Overflow See other posts from Stack Overflow or by Andrew
Published on 2009-10-22T20:04:42Z Indexed on 2010/05/21 6:10 UTC
Read the original article Hit count: 159

Filed under:
|
|

In MySQL you can insert multiple rows like this:

INSERT INTO 'tablename' ('column1', 'column2') VALUES
    ('data1', 'data2'),
    ('data1', 'data2'),
    ('data1', 'data2'),
    ('data1', 'data2');

However, I am getting an error when I try to do something like this. Is it possible to insert multiple rows at a time in an SQLite database? What is the syntax to do that?

© Stack Overflow or respective owner

Related posts about sqlite

Related posts about sql