开发者

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)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜