Home > Software design >  Why do I get error and the query not executing in SQLlite
Why do I get error and the query not executing in SQLlite

Time:01-23

why do I get error when executing the following:

INSERT INTO AnniversaryAttendees (CustomerID, PartySize) VALUES ((SELECT CustomerID FROM Customers WHERE Email="[email protected]"), ("4");

Error while executing SQL query on database 'restaurant': incomplete input

CodePudding user response:

It's because of the extra ( before "4? Try:

INSERT INTO AnniversaryAttendees (CustomerID, PartySize) VALUES ((SELECT CustomerID FROM Customers WHERE Email="[email protected]"), "4");
  •  Tags:  
  • Related