INSERT INTO `assets` (SKU, Quantity, Description, Value, Location, Owner, Notes, Index)
VALUES ('OUOUOuouOUO', 'OU', 'OUO', 'IU', 'OI', 'OI', 'HJO', '')
Where have I gone wrong in this SQL query? Everything seems to be in order! If it is some thing to do with the choice of quotes i.e. ' vs. ` vs. " could you explain the usage and choice between them?
SO’s syntax highlighting hints at the problem in this query. You need to write the word
Indexin quotes — it is a reserved word, and by using it in this context without quoting I’m guessing your SQL server is getting confused.For more information: