0

i got some struggle with inserting multiple rows in my SQLite3 DB. I'm trying to insert round about 1000 rows with one SQL INSERT statement using this syntax:

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

I've read something like there is a limit of 500 rows per multiple insert action in this thread: Is it possible to insert multiple rows at a time in an SQLite database?

But i don't know if i got it right.

So...is it right, that this syntax im using is limited to 500 "values" per SQL statement??

What can i do if want to insert more? Do i have to split the data and do more queries?

Thanks :)

Community
  • 1
  • 1
xMaNuu
  • 31
  • 1
  • 7
  • 2
    It is still limited to 500. You should try searching properly before asking a question http://stackoverflow.com/questions/15858466/limit-on-multiple-rows-insert You will need to split at 500 and could consider running it inside a transaction so that it all happens at the same time – Takarii Jan 04 '17 at 15:44
  • \*Clickety-click* It's not limited to 500 (except if your PHP is too old). – CL. Jan 05 '17 at 08:40
  • @CL. nice ninja update ;) Glad the limit is removed at last. – Takarii Jan 06 '17 at 13:20

0 Answers0