瀚高数据库获取数据表结构(字段名,字段类型,字段长度,是否为空,描述 )SQL语句
SELECT
c.column_name as "字段",
c.data_type as "字段类型",
c.character_maximum_length as "字段长度",
c.is_nullable as "是否为NULL",
t.description as "注释"
FROM
pg_class as p
LEFT JOIN information_schema.columns as c ON p.relname=c.table_name and p.relkind ='r'
LEFT JOIN pg_description as t ON t.objoid=p.oid and c.ordinal_position=t.objsubid
WHERE
p.relname = ''; -- 替换为你的表名称
标签:语句,段长度,获取数据,为空,SQL,字段名 From: https://www.cnblogs.com/dikeko/p/18123560