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;
查询结果