I have a table like this:
id products_name sort
1 abc 0
2 xyz 1
3 pqr 2
4 qwe 0
I want to sort records through the sort column and in ascending order, but I don’t want the rows with 0 at the top in the result set.
The rows having 0 in the sort column should be at the bottom of the result set, and the rest of the rows should be sorted in ascending order using the sort column.
How do I do this?
You could try something like: