In H2 I can set the compatibility mode for a connection:
SET MODE DB2;
Is there a way to query the mode like:
GET MODE;
For the current schema I can do select schema() but select mode() will not work. Any suggestions?
>Solution :
With H2 1.*.* use
SELECT `VALUE` FROM INFORMATION_SCHEMA.SETTINGS WHERE NAME = 'MODE';
With H2 2.*.* use
SELECT SETTING_VALUE FROM INFORMATION_SCHEMA.SETTINGS WHERE SETTING_NAME = 'MODE';
Use upper-case names of tables and columns in these queries for more safety, H2 has really weird settings for case conversion and sensitivity and some applications may enable them.
If old information schema was enabled in H2 2.*.* with a special setting or because old driver was used for remote connection to a new server, use variant for H2 1.*.*.