At 2:23 PM +0200 5/28/01, Alessandro Staltari wrote:
>Hello. I'm new to MySQL but I have a problem that appears serious, 
>al least for me.
>I can't create a table with a field named INFILE. I think mysql 
>consider INFILE as a keyword. Is there work around for this?
>Shouldn't INFILE be used only within a LOAD statement? I think it is 
>a bug in the query parser?

Well, by that reasoning, COMMIT reasoning is used only in a COMMIT statement,
so it should be allowable as a column name.

Doesn't matter where a keyword is used; if it's a keyword, it's a keyword.

Anyway, if you really want to use INFILE as a column name, you can do so,
but you need to enclose it in backquote (`INFILE`) each time you refer
to it.  This will allow you to port your table from another database,
but since it still requires some rewriting (to add those pesky backquotes),
you may find it just as easy to rename the column.

>
>Regards
>
>Alessandro Staltari


-- 
Paul DuBois, [EMAIL PROTECTED]

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to