mysql> INSERT INTO Departments VALUES (1, ‘Accounting’),
-> (2, ‘Human Resources’),
-> (3, ‘Marketing’);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Resources’),
(3, ‘Marketing’)' at line 2
I have tried using " instead of ‘, checked the table structure to ensure ‘Human Resources" is a VARCHAR(50) value. I’ve searched the internet and the MySQL 8 manual. I’m at a loss or my brain is vapor-locked. Thanks for the help.
>Solution :
Your insert statement is using curly single quotes instead of straight ones. Use this version and it should work:
INSERT INTO Departments
VALUES (1, 'Accounting'),
(2, 'Human Resources'),
(3, 'Marketing');
While your question is really just a typo, the corrective action may be worth mentioning as an answer. You should change your text editor to something which just defaults to using plain ASCII, such as Windows Notepad. Most likely, you typed out that insert statement with some rich text editor, which is not giving you the single quotes you need.