Details
Description
How to repeat:
ij> create table t (i integer, j integer);;
0 rows inserted/updated/deleted
ij> insert into t values (1,2),(1,3);
2 rows inserted/updated/deleted
ij> select distinct i from t order by j;
ERROR 42879: The ORDER BY clause may not contain column 'J', since the query specifies DISTINCT and that column does not appear in the query result.
ij> select distinct i from t order by j*2;
I
-----------
1
1
2 rows selected
Attachments
Attachments
Issue Links
- relates to
-
DERBY-4406 Wrong order when using ORDER BY on non-deterministic function
- Closed