Use index values from your select statement (note they start at 1 not 0)
For example if you have a select statement like this:
SELECT value1, value2, value3
Replace: ORDER BY value2, value3
With: ORDER BY 2, 3
This works with MySQL and Derby
Quote:
Originally Posted by grogi
Yes, this query works fine but if you only have distinct rows. If you have union from same table but with different filters then you'll have a duplicates in the result set because of the column OrderBY.
|