设为首页 加入收藏

TOP

PostgreSQL列所有表结构的查询语句
2014-11-24 00:44:10 来源: 作者: 【 】 浏览:17
Tags:PostgreSQL 所有 结构 查询 语句

PostgreSQL列所有表结构的查询语句
SELECT tablename FROM pg_tables
WHERE tablename NOT LIKE 'pg%'
AND tablename NOT LIKE 'sql_%'
ORDER BY tablename;
www.2cto.com
查询表t_appointment_apply表的字段信息
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='t_appointment_apply' and a.attnum>0 and a.attrelid=c.oid and a.atttypid=t.oid
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇MongoDB结构划分简述 下一篇修改表结构添加外键约束,默认外..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: