Subject Re: [firebird-support] Reserved keywords in column names vs. case
Author Martijn Tonies

> I am rewriting a certain application, which currently only works with
> (quite poorly at that, but that's not an issue here), to support Firebird.
> The idea is that I will rewrite some key parts of the application in such
> way as to work with either database (or any other, if someone feels like
> writing the relevant SQL code). To keep backwards compatibility, I want to
> use as much of the old data structures as possible (even though the
> database design is simply awful). Unfortunatelly, that means many fields
> have names which are reserved in Firebird (e.g. 'view'). I can overcome
> obstacle by enclosing them in quotes (SELECT "view" FROM table WHERE ...),
> but if I do this, Firebird expects me to match the case of the field name
> exactly (SELECT "View" ... [notice the capital V] won't work) - unlike
> regular field names, which are always converted to upper case first. The
> question is: Is there some way to allow field names like "view" but keep
> them case-insensitive? I suspect there's not, but I'd like to be sure
> I commit myself...

You are correct: you cannot have quotes and have them case insensitive.

This is how the SQL standard works: no quotes is case insensitive, with
quotes, is case sensitive.

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
My thoughts:
Database development questions? Check the forum!