Skip navigation links

MySQL Forums :: Stored Procedures :: Illegal Column Names?


Advanced Search

Illegal Column Names?
Posted by: Mark Vancura ()
Date: August 28, 2013 03:18PM

I found myself trying to create a table with a column named "Usage" which documents how the object of this row is used, but I get:
create table junk (Usage varchar(8192)) ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'usage varchar(8192))' at line 1

Is there a way to escape the name so that I can still use it?
Is there a list of illegal names so that I know which ones to escape?

This works:
create table junk(wsage varchar(8192)) ;
Query OK, 0 rows affected (0.22 sec)

So it is only "usage" in all case variations, that is illegal.

I need a work-around.

Options: ReplyQuote


Subject Views Written By Posted
Illegal Column Names? 1138 Mark Vancura 08/28/2013 03:18PM
Re: Illegal Column Names? 465 Rick James 08/31/2013 04:22PM
Re: Illegal Column Names? 421 Peter Brawley 09/01/2013 08:32PM


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.