Postgresql Custom Order for fixed values
I need a select resu开发者_StackOverflowlt to look like this
UK
Europe
USA
The values are fixed ( no table is need it ). The order is important so ORDER BY 1 is not working.
What is the sql query ( as simple as possible ) that will build this result ?
You could use VALUES lists:
VALUES ('UK'), ('Europe'), ('USA');
column1
---------
UK
Europe
USA
(3 rows)
精彩评论