Search code examples
mysqlsqlcasesql-order-by

how to sort a particular value at the end?


how can i display the word Not Listed at the very bottom so that even in my dropdown menu it shows at the botton?

items
-------

id    name

1     some name 1
2     some name 2
3     some name 3
4     Not Listed
5     some name 4
6     some name 5

what will the query be like for this?

Currently my query is like

SELECT *
FROM items
ORDER BY id DESC 

Thanks


Solution

  • SELECT *
    FROM items
    ORDER BY name