I want to have my table rcarddetsorted by "SDNO" (not primary key) in ascending order, with the exception of "0". So it should look like this:
1
1
2
.
.
10
0
0
Now my request is:
SELECT *
FROM `rcarddet`
WHERE `RDATE` = '2011-05-25'
AND `RCNO` = '1'
AND `PLACE` = 'H'
AND `SDNO` != 0
ORDER BY `rcarddet`.`SDNO` ASC;
source
share