首页 > 数据库技术 > 详细

postgresql的show databases、show tables、describe table操作

时间:2014-08-12 10:25:43      阅读:1536      评论:0      收藏:0      [点我收藏+]
1、相当与mysql的show databases;
select datname from pg_database;


2、相当于mysql的show tables;
SELECT table_name FROM information_schema.tables WHERE table_schema = 'public';
public 是默认的schema的名字


3、相当与mysql的describe table_name;
SELECT column_name FROM information_schema.columns WHERE table_name ='table_name';
'table_name'是要查询的表的名字

postgresql的show databases、show tables、describe table操作,布布扣,bubuko.com

postgresql的show databases、show tables、describe table操作

原文:http://blog.csdn.net/u011402596/article/details/38510547

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!