We read your photo as:

How to fix "ERROR 1064 (42000): You have an error in your SQL syntax" when inserting into a MySQL table?

Computer Science

ScanSolve AI Answer

You're still getting the ERROR 1064 (42000): You have an error in your SQL syntax because you're using double quotes (") around Basic Salary. In MySQL, column names with spaces or special characters must be enclosed in backticks (`), not double quotes.

Here is the corrected command for inserting into the Salary table:

Step 1: Insert the salary details for the new employee into the Salary table, using backticks for Basic Salary.

INSERT INTO Salary (SalaryID, EmpID, ‘Basic Salary‘, Bonus)VALUES (11, 11, 18000, NULL);\text{INSERT INTO Salary (SalaryID, EmpID, `Basic Salary`, Bonus)} \\ \text{VALUES (11, 11, 18000, NULL);}

Execute this command.

Was this helpful?

Still stuck on this one?

Ask a follow-up, and the answer starts from this question.

Got a different question?Ask your own question
Handwritten step-by-step solution preview

Handwritten Step-by-Step Solution

Get this as a handwritten image on WhatsApp — like a tutor wrote it for you.

Try on WhatsApp