MySQL Forums
Forum List  »  Stored Procedures

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

Written By
Illegal Column Names?
August 28, 2013 03:18PM
August 31, 2013 04:22PM
September 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.