Suppose I have the following query:
SELECT id, name FROM table ORDER BY name
- 4, Ashley
- 1, Anna
- 2, David
- 3, Zack
How would I choose a specific name before the order, and then do the rest of the order, something like:
SELECT id, name FROM table ORDER BY name='david', name
- 1, David
- 4, Ashley
- 1, Anna
- 3, Zack
source share