Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQLite 'INSERT INTO' Error - Populate new table [duplicate]

I searched the hinted posts, when posting this question but I foud none similar, so I apologize if I missed any.

Here's my problem. I created a table and it's fields, in SQLite Administrator, then I wrote the following query to populate the table:

  USE Contact_Database;

  INSERT into Names (Contact_ID, FirstName, LastName) VALUES
  (1, 'Joana', 'Tavares'),
  (2, 'Patrícia', 'Dias'),
  (3, 'Paulo', 'Costa'),
  (4, 'Marco', 'Almeida'),
  (5, 'Bruno', 'Lindo'),
  (6, 'Manuela', 'Lindo'),
  (7, 'João', 'Lindo'),
  (8, 'Rui', 'Trindade');

Result error: SQL Error: near "USE": syntax error

I've also tried with:

  INSERT into Contact_Database.Names

Result error: SQL Error: near ",": syntax error <

What am I missing here?

like image 599
csbl Avatar asked Jun 05 '26 10:06

csbl


1 Answers

Multiple inserts in one query are not supported.

See this question for more information.

like image 189
Matt Beckman Avatar answered Jun 07 '26 22:06

Matt Beckman