因为PostgreSql没有order by field 所以按照指定的顺序排序就没有这么简单了,可以使用case when then进行排序


select stage,pln_status from project
ORDER BY
case
when pln_status = '规划' then 1
when pln_status = '初选' then 2
when pln_status = '查勘' then 3
when pln_status = '评审' then 4
when pln_status = '批复' then 5
when pln_status = '初设' then 6
when pln_status = '开工' then 7
end