获取postgresql字段信息

前端之家收集整理的这篇文章主要介绍了获取postgresql字段信息前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

SELECT col_description(a.attrelid,a.attnum) as comment,format_type(a.atttypid,a.atttypmod) as type,a.attname as name,a.attnotnull as notnull

FROM pg_class as c,pg_attribute as a

where c.relname = 'mc_log_app' and a.attrelid = c.oid and a.attnum>0

猜你在找的Postgre SQL相关文章