My bad, DISTINCT... ORDER BY UPPER works indeed as one can test using
set mode regular;
with a as (select 'a', 'b')
select distinct 1 from a order by upper(2)
As to the mode, I understand it's confusing. I am at the mercy of that
legacy app which sends non-standard SQL except if it the driver
So you use either Oracle or H2 in MySQL compatibility mode? It's a pretty
strange choice, you're just looking for trouble.
If your query looks like
SELECT DISTINCT A FROM someTable ORDER BY someFunction(A)
you don't need a compatibility mode, such query is accepted by H2 since
1.4.198. (But
I am using MySQL mode indeed because the app sends statements like in
https://github.com/h2database/h2database/pull/1287, which was only
fixed/allowed in MySQL mode.
Granted the latter is not supported in Oracle but "the app" looks up the
DatabaseMetadata to use the right syntax.
The errors on
Sorry, I was wrong and H2 actually accepts DELETE without FROM in all
versions available on Maven Central.
The only exclusion is MySQL compatibility mode. In this mode recent
versions of H2 do not accept DELETE without FROM, older versions accept it
too. Because MySQL does not accept it, this
Hello.
What version of H2 do you use?
H2 incorrectly accepts DELETE without FROM in all modes except MySQL
compatibility mode since version 1.4.197 I guess.
This is caused by incorrect implementation of feature request 585 for MySQL
compatibility: