Hello,

The following query doesn't work correctly in H2:

select x from (
  select 1 x union 
  select 2   union
  select 3
) t 
order by (select -x) asc


The above should return

+----+
|   X|
+----+
|   3|
|   2|
|   1|
+----+


But instead returns:

+----+
|   X|
+----+
|   1|
|   2|
|   3|
+----+


For the record, this query returns the correct result:

select x from (
  select 1 x union 
  select 2   union
  select 3
) t 
order by -x asc


Cheers,
Lukas 

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to