On Sat, May 9, 2009 at 7:10 AM, H.Merijn Brand <[email protected]> wrote:

> Can someone show me the case specifications for SQL?
> I think that unless quoted table names are case insensitive, so
>
>  SELECT * FROM FOO;
>
> equals
>
>  select * from foo;
>
> but does not equal
>
>  SELECT * from "Foo";
>
> IMHO, when selecting from files, unquoted table names should match
> case-insensitive, so a file named "Foo" should match all three, but
> file named "foo" should match the first two statements.
>  <http://www.goldmark.org/jeff/stupid-disclaimers/>
>

Section 5.4 Names and Identifiers of SQL 2003 says in the 'Syntax Rules':

2) An <SQL language identifier> is equivalent to an <SQL language
identifier> in which every letter that is
a lower-case letter is replaced by the corresponding upper-case letter or
letters. This treatment includes
determination of equivalence, representation in the Information and
Definition Schemas, representation in
diagnostics areas, and similar uses.

This is different from the rules for a delimited identifier (one enclosed in
double quotes - unless in MS SQL Server, where [square brackets] are
preferred).

-- 
Jonathan Leffler <[email protected]>  #include <disclaimer.h>
Guardian of DBD::Informix - v2008.0513 - http://dbi.perl.org
"Blessed are we who can laugh at ourselves, for we shall never cease to be
amused."

Reply via email to