ORDER BY
CASE ID
WHEN 4 THEN 0
WHEN 3 THEN 1
WHEN 1 THEN 2
WHEN 5 THEN 3
WHEN 6 THEN 4
END
More Related Contents:
- How to use SQL Order By statement to sort results case insensitive?
- SQLite Order By Date1530019888000
- Sort by column ASC, but NULL values first?
- ORDER BY the IN value list
- SQL best practice to deal with default sort order
- SQLite INSERT – ON DUPLICATE KEY UPDATE (UPSERT)
- What are valid table names in SQLite?
- Optimize query with OFFSET on large table
- How to use DISTINCT and ORDER BY in same SELECT statement?
- Deleting duplicate rows from sqlite database
- Delete column from SQLite table
- sqlite database default time value ‘now’
- How do I insert datetime value into a SQLite database?
- basic recursive query on sqlite3?
- How to ORDER BY a SUM() in MySQL?
- GROUP_CONCAT in SQLite
- Match only entire words with LIKE?
- “Order By” using a parameter for the column name
- What is causing Foreign Key Mismatch error?
- How to split comma-separated values?
- sqlite select with condition on date
- How to compare sqlite TIMESTAMP values
- SQL for ordering by number – 1,2,3,4 etc instead of 1,10,11,12
- SQL – Inserting a row and returning primary key
- Curious issue with Oracle UNION and ORDER BY
- SQLite query, ‘LIKE’
- How to use a calculated column by another calculated column
- UPSERT *not* INSERT or REPLACE
- Drop column from SQLite table
- converting int to real in sqlite