sql - mysql syntax error -
I wrote this simple query statement:
Include in merchants ('first name ',' ('Bob', 'Smith'))
seems very easy but I get this error:
`# 1064 - You have a Error is your SQL syntax; To use the values ('Bob', 'Smith') for the correct syntax, see the manual related to your MySQL server edition)>
You need to delete quotes with the first names and last names:
Insert merchants (first name, last name) VALUES ('Bob' , 'Smith')
Columns are names identifiers, and are not quoted as such.
Edit: The name of the column can be cited by using the backticks (`), but it is only necessary if you have the column Are names that contain special characters or column names that match MySQL keywords.
Comments
Post a Comment