Best way to insert multiple rows at a time #444
-
What is the best way to insert multiple rows at a time in a given table (with the same structure). I didn't manage to pass multiple values to SQLiteDBConnection.run(). I guess it may depend on the version I'm using? I'm currently in 5.0.1. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Generate a simple SQL request like the following one and use the SQLiteDBConnection.execute() function seems to work. INSERT INTO 'tablename' ('column1', 'column2') VALUES
('data1', 'data2'),
('data1', 'data2'),
('data1', 'data2'),
('data1', 'data2'); I would still like explanations |
Beta Was this translation helpful? Give feedback.
-
I have find my answer on another discussion : #435 (comment) |
Beta Was this translation helpful? Give feedback.
I have find my answer on another discussion : #435 (comment)
Seems like I can use run command on passe an array of array of values.