When I select data from a MySQL table and order it by a DECIMAL column DESCENDING, this is the order:
3, 2, 1, -1, 0
Why is this so?
How to correctly set the order so that it is:
3, 2, 1, 0, -1 ?
EDIT
Actually, the problem is with NULL data. This is the order it does:
3, 2, 1, -1, NULL, NULL
This is the desired order:
3, 2, 1, NULL, NULL, -1
use
COALESCEin yourORDER BYclause