PostgreSQL中使用SQL查询表结构(转自:http://deepfuture.iteye.com/blog/588758)

前端之家收集整理的这篇文章主要介绍了PostgreSQL中使用SQL查询表结构(转自:http://deepfuture.iteye.com/blog/588758)前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
SELECT a.attnum,a.attname AS field,t.typname AS type,a.attlen AS length,a.atttypmod AS lengthvar,a.attnotnull AS notnull
	FROM pg_class c,pg_attribute a,pg_type t
	WHERE c.relname = 'person' and a.attnum > 0 
		and a.attrelid = c.oid and a.atttypid = t.oid
	ORDER BY a.attnum;
原文链接:https://www.f2er.com/postgresql/196673.html

猜你在找的Postgre SQL相关文章