入门客AI创业平台(我带你入门,你带我飞行)
博文笔记

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

创建时间:2014-08-12 投稿人: 浏览次数:3587
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"是要查询的表的名字

声明:该文观点仅代表作者本人,入门客AI创业平台信息发布平台仅提供信息存储空间服务,如有疑问请联系rumenke@qq.com。
  • 上一篇:没有了
  • 下一篇:没有了
未上传头像