SELECT a.attnum,a.attname AS field,t.typname AS type,a.attlen AS length,
a.atttypmod AS lengthvar,a.attnotnull AS notnull
from pg_class c,pg_attribute a,pg_type t where c.relname='t_approve_auditor'
and a.attnum>0 and a.attrelid=c.oid and a.atttypid=t.oidposgresql 查询表结构
最新推荐文章于 2024-12-06 09:29:41 发布
本文详细介绍了如何使用SQL查询语句从pg_class、pg_attribute和pg_type表中获取指定表(t_approve_auditor)的字段名、类型、长度和是否为非空属性。
1万+

被折叠的 条评论
为什么被折叠?



