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");
