Is it possible to insert multiple sets of values to a SQLite table in one statement?
I was trying:
INSERT INTO the_table VALUES (1,2,'hi'),(2,0,'foo');
with the different ()s representing different insert sets, but I get an error.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Are there only three columns in your table? If not, you could try defining the column names you are setting like so:
This convention was introduced in SQL Server 2008 known as the Table Value Constructor. See MSDN’s INSERT page for a look at the overall syntax. Also, the
INSERTstatement can be easily formatted for better readability.