MySQL Forums
Forum List  »  Newbie

Re: MySql Column Name Limitation
Posted by: douglas wilson
Date: August 19, 2014 12:33AM

We can create queries with or without the backtick (`) symbol in MYSQL.

Eg: SELECT * FROM TEST;

SELECT * FROM `TEST`;

backtick (`) called quoted identifiers and they tell the parser to handle the text between them as a literal string. They are useful for when you have a column or table that contains a keyword or space.

Eg: this is not work

create table my table (id int);

But the following would:

create table `my table` (id int);

the following would get an error if status was a keyword:

select status from some_table

But this one will be parsed correctly:

select `status` from some_table

Options: ReplyQuote


Subject
Written By
Posted
August 15, 2014 11:24AM
Re: MySql Column Name Limitation
August 19, 2014 12:33AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.