数据库
首页 > 数据库> > postgreSQL常用sql

postgreSQL常用sql

作者:互联网

查看表字段注释

Select a.attnum,(select description from pg_catalog.pg_description where objoid=a.attrelid and objsubid=a.attnum) as descript,a.attname,pg_catalog.format_type(a.atttypid,a.atttypmod) as data_type from pg_catalog.pg_attribute a where 1=1 and a.attrelid=(select oid from pg_class where relname='tbl_pd_collect_position' ) and a.attnum>0 and not a.attisdropped order by a.attnum;
real_name是表名

标签:常用,postgreSQL,attnum,catalog,pg,sql,where,select,attrelid
来源: https://www.cnblogs.com/alvisClub/p/15211132.html