H2 database has one great feature i:e ability to run in MySQL compatible mode by appending MODE=MYSQL to jdbc URL.
It works simply great, most of the table creating SQL scripts created for MySQL work without modification. I have only found some issues, is it possible to implement them ? In MySQL inserting 0 in AUTO_INCREMENT column behaves like inserting NULL so that automatically a new incremental integer is assigned to identity column. Whereas for H2 database, if you insert 0 in IDENTITY column, it is inserted as coerced 0 value ignoring auto incremental behavior. To get proper auto increment key either we must insert NULL or not include that field in INSERT statement. Can H2 be made to behave like MySQL accepting 0 as alias for NULL only for IDENTITY column ? This should be the case only when the database is connected in MYSQL compatibility mode. ( MODE=MYSQL ). Is it possible to preserve the column name case accepting both upper and lower case rather than turning all column names to lower case as it happens currently If this happens than it can be made to behave almost indistinguishable from MySQL. If Java is the middle-ware, than even a guru will have tough time to figure out which database engine is running behind the scene in web application H2 / MySQL Many web developers willing to get rid of infectious nature of GPL license terms will quickly turn to H2 Thanks Sharad Kelkar --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
