首页 > TAG信息列表 > attrelid

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.

pg 生成数据字典

select(select relname||'--'||(select description from pg_description where objoid=oid and objsubid=0) as comment from pg_class where oid=a.attrelid) as table_name,a.attname as column_name,format_type(a.atttypid,a.atttypmod) as data_type,(case wh

Postgresql获得表字段结构信息包含注释

Select * From (   Select     a.relname FTableName,     b.attname FFieldName,     format_type(b.atttypid,b.atttypmod) as FFieldType,     col_description(b.attrelid,b.attnum) FFieldDesc,     b.attnum FNo,     b.attnotnull FNotNu