Subject Re: [firebird-support] Reserved field names
Author Helen Borrie
At 10:01 AM 1/06/2004 +0000, you wrote:
>Hi,
>
>I'm not sure if this is the right forum to ask this question, but is
>there any technical reason you can't create a field in a database with
>the name YEAR or TYPE without quoting it.
>
>Currently I'm porting a application that I use with Oracle to
>Firebird, and there seems to be many field names that I cannot use,
>even some slightly misspelled words like RESERV. Anyway, I'm just
>wondering if there is any technical reason why these words cannot used
>as field names. I can't imagine any sql statement that these would
>cause parsing problems with. Ok, maybe with TYPE, but not the others
>:-)
>
>Any ideas?

Yes: you picked three words that are all reserved words.

YEAR is reserved because it is part of the EXTRACT function, e.g.
EXTRACT(YEAR FROM CURRENT_DATE). MONTH, DAY, HOUR, SECOND, YEARDAY and
WEEKDAY are also reserved for the same reason.

In answer to your next question: why RESERV?
Answer: for backward compatibility with InterBase.

In answer to the question after that? No, I have no idea what RESERV
applies to. Perhaps an alternative to RESERVING (but I really don't know!)

Kia ora
/heLen