如何按排序顺序列出所有表列?

Oxf*_*ist 10 postgresql table

我知道\d table_name列出了该表的所有列,但是有没有办法按字母顺序列出它们?

Cra*_*ger 25

通常,使用information_schema

SELECT column_name
FROM information_schema.columns 
WHERE table_schema = 'public' 
AND table_name = 'blah' 
ORDER BY column_name ASC;
Run Code Online (Sandbox Code Playgroud)