Hello. > Yes, MS SQL Server is doing something similar (identifiers are not > case sensitive, but the original case is stored). I agree > compatibility modes for the various databases need to be improved.
IMHO Just having only that would be a big improvement. As I work with h2 - I notice that quite a lot of things work similarly to MS SQL Server (although it's quite different in some areas.) I'd still love to have the ability for enforced case sensitivity for table names and column names (keywords are not so important to me as it is to Maaartin) without having to quote them as that's the mode I'd like to work in - otherwise I have to quote every single name everywhere in all my SQL. Another thing that might be more useful and more compatible in general would be to first try using the actual case of the names entered in the SQL and if that works, use it, and then only uppercase it if it's not found under the tried keys. For example, if I were to define a table like this: CREATE TABLE "MyTable" ( "Xyz" int not null primary key, "Stuff" varchar(20) ) Just by creating the table this way (in h2's current design), I have just destined myself to always having to quote both the table name and all it's columns everywhere in all SQL that accesses the table. So to select from this table I am *required* to use SELECT "Xyz","Stuff" from "MyTable" but if h2 were to first attempt a direct match using the case entered in the SQL, then SELECT Xyz, Stuff from MyTable Would execute properly. I think that would get me to 90% of what I'm after without having to have enforced case sensitivity always on everywhere. Of course if one starts embedding spaces in tables and column names then there isn't really any good way to get around using the quotes. (But I'm not really interested in embedding spaces in my names - I'm more interested in camel casing things Java style.) The nice thing about making the hypothetical case enforcing flags as we laid them out is that it won't affect the compatibility of h2 against other RDBMS's because the flags are optional and not used by default. Therefore, if anything, they increase compatibility by giving the programmer more options to use. -- 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.
