Select * From (
Select
a.relname FTableName,
b.attname FFieldName,
format_type(b.atttypid,b.atttypmod) as FFieldType,
col_description(b.attrelid,b.attnum) FFieldDesc,
b.attnum FNo,
b.attnotnull FNotNull
from
(select oid, * from pg_class where relnamespace=2200 and reltype>0) a
left join
(select * From pg_catalog.pg_attribute where attnum>0 and atttypid>0 ) b
on a.oid=b.attrelid
) A
Order by ftablename,fno
转载于:https://www.cnblogs.com/wuxuan/p/10433169.html