0

While searching for an answer to another problem, I found an answer (https://stackoverflow.com/a/32634993) containing a Insert-SQL-statement with a word in single quotation marks in the attribute-enumeration. I have never seen this before. Dose it have any purpose or is it just a mistake by the author of the comment?

See " 'order' ":

INSERT INTO table_name (name_first, name_last, `order`)
VALUES (....);
0

1 Answer 1

1

order is a reserved word in MySQL and a keyword in SQL. That makes it a really bad choice for a column name.

But someone chose it anyway. Sigh.

The backticks escape the column name so it is not confused with the order in order by.

As a note: There is a mistake, but the mistake is in allowing a name such as order for a column. I mean, even ordering is fine.

Sign up to request clarification or add additional context in comments.

1 Comment

"but the mistake is in allowing a name such as order for a column" is simply not true.... But it is advise not to use a reserved word.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.