sql 语句

select
    a.attnum,
    a.attname as field,
    a.attlen as length,
    a.atttypmod as lengthvar,
    a.attnotnull as notnull,
    b.description as comment
from
    sys_class c,
    sys_attribute a
left outer join sys_description b on
    a.attrelid = b.objoid
    and a.attnum = b.objsubid
where
    c.relname = '表名'
    and a.attnum > 0
    and a.attrelid = c.oid
order by
    a.attnum;

查询结果

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐