Subject | Re: [firebird-support] Reserved keywords in column names vs. case |
---|---|
Author | Martijn Tonies |
Post date | 2007-08-20T09:56:13Z |
Hi,
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
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com
> I am rewriting a certain application, which currently only works withMySQL
> (quite poorly at that, but that's not an issue here), to support Firebird.a
> 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 likeoriginal
> 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 fieldsthis
> have names which are reserved in Firebird (e.g. 'view'). I can overcome
> obstacle by enclosing them in quotes (SELECT "view" FROM table WHERE ...),before
> 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
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com