SELECT * FROM Customers
ORDER BY case when country = 'P' then 1
when country = 'A' then 2
when country = 'L' then 3
when country = 'H' then 4
else 5
end asc
More Related Contents:
- When no ‘Order by’ is specified, what order does a query choose for your record set?
- How to update and order by using ms sql
- SQL Server UNION – What is the default ORDER BY Behaviour
- “Order By” using a parameter for the column name
- how does SELECT TOP works when no order by is specified?
- Dynamic order direction
- SQL QUERY COUNT THEN ADD
- SQL server command help and tutorials for specific commands?
- How do I UPDATE from a SELECT in SQL Server?
- CROSS JOIN vs INNER JOIN in SQL
- Referring to a Column Alias in a WHERE Clause
- INNER JOIN vs LEFT JOIN performance in SQL Server
- Function vs. Stored Procedure in SQL Server
- SQL Query – Using Order By in UNION
- What’s the best way to select the minimum value from several columns?
- Counting DISTINCT over multiple columns
- How to check if a stored procedure exists before creating it
- Insert Into… Merge… Select (SQL Server)
- Correct use of transactions in SQL Server
- The parameterized query expects the parameter which was not supplied
- SQL Server converting varbinary to string
- SSIS Source Format Implicit Conversion for Datetime
- UNION the results of multiple stored procedures
- Executing SQL Server Agent Job from a stored procedure and returning job result
- Compare dates in T-SQL, ignoring the time part
- SQL ORDER chars numerically
- Should I use the CASCADE DELETE rule? [duplicate]
- Why is RAND() not producing random numbers?
- SQL, How to Concatenate results?
- Should every SQL Server foreign key have a matching index? [closed]