PostgreSQL:
表名:a_bzj
select a.attname ,col_description(a.attrelid,a.attnum)as comment,format_type(a.atttypid,a.atttypmod) as type,attnotnull as notnull from pg_class c,pg_attribute a where c.relname='a_bzj' and c.oid=a.attrelid and a.attnum>0;
select column_name zd_name,character_maximum_length zd_length,ordinal_position zd_xh, udt_name zd_lx,data_type zd_bzl from information_schema.columns where table_name='a_bzj';