Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Matthew Crouch
December 16, 2005, 2:02 pm
rate this thread
i like simple, singular table names. For example "user". I bet you know
the problem already: USER is a keyword, and when I query this table i
get errors. Is there a way to make mysql's keyword-watching
case-sensitive? so it would leave "user" alone but catch errors on
"USER". Good SQL writing means capitalizing keywords yourself...
should i just get accustomed to table prefixes? i think they're ugly;
what do you think?
Re: i know this isn't the place for feature requests, but...
No -- SQL keywords are always case-insensitive. As for table names, they
are case-insensitive on Windows and case-sensitive on UNIX/Linux. And I
think there's an option for the MySQL server that can override this, but
that's besides the point of your question.
I don't think identifier prefixes are necessarily ugly. But that's a matter
Anyway, you can use a table name that conflicts with a reserved word by
enclosing it in back-ticks:
SELECT * FROM `USER`;
(FWIW, standard SQL uses double-quotes for this purpose.)
- » Americanas.com SALDO de TVs Com at 80% de Desconto (29798)
- — Newest thread in » MySQL Database Forum