当前位置:数据库 > SQLServer >>

PostgreSQL列所有表结构的查询语句


PostgreSQL列所有表结构的查询语句
 
SELECT   tablename   FROM   pg_tables   
WHERE   tablename   NOT   LIKE   'pg%'   
AND tablename NOT LIKE 'sql_%' 
ORDER   BY   tablename; 
  www.zzzyk.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
Oracle
MySQL
Access
SQLServer
DB2
Excel
SQLite
SYBASE
Postgres
如果你遇到数据库难题:
请访问www.zzzyk.com 试试
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,