I would like to see a setting or mode in h2 where table names and
column names are always completely case sensitive (whether quoted or
not.) It would be very nice when working tightly with C family based
languages (including Java and Javascript of couse.)  Yes it goes
against the long tradition of case insensitivity in the SQL standards
and various RDBMS's.  But why don't we innovate here a little bit and
make something better?  Better is subjective of course, but I think
it's more expressive and ultimately more useful.

On Feb 18, 6:28 am, Thomas Mueller <[email protected]>
wrote:
> Hi,
>
> > Thomas, this effect can be reproduced when you use the linked tables.
>
> You are right. I didn't know that, identifiers in MS SQL Server 
> arecaseinsensitive even if they are quoted:
>
> drop table foo;
> drop table foo2;
> drop table foo3;
> create table foo(ID int, Bar varchar(255));
> create table "foo2"("ID" int, "Bar" varchar(255));
> create table [foo3]([ID] int, [Bar] varchar(255));
> select id, bar from foo;
> select id, bAr from foo2;
> select iD, baR from foo3;
> select "iD", "bAr" from foo;
> select [Id], "BAr" from foo2;
> select [iD], [baR] from foo3;
>
> All of those statements work. I will change the behavior in the next
> release. My testcase:
>
> MS SQL Server (Microsoft SQL Server 9.00.1399):
> drop table foo;
> create table foo(ID int, Bar varchar(255));
> insert into foo values(1, 'Hello');
>
> H2:
> drop table if exists foo;
> drop table if exists foo_linked;
> create linked table foo_linked(null,
>   'jdbc:sqlserver://localhost;DatabaseName=test',
>   'sa', '...', 'foo');
> insert into foo_linked values(2, 'World');
> select Id, Bar from foo_linked;
> create table foo as select * from foo_linked;
> select Id, Bar from foo;
>
> Regards,
> Thomas

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to