pg数据库下的基本命令

1. q 推出数据库

2.

SELECT * FROM "table_name";

3.数据库查看:pgci public_query

4.具体命令:

4.0:  c testdb;

4.1:  l                       //加上字母l,相当于mysql的,mysql> show databases;  

4.2:  dt                      //相当于mysql的,mysql> show tables;  

4.3:  d test;                 //相当于mysql的,mysql> desc test(表名);  

4.4:  di                      //相当于mysql的,mysql> show index from test; 

4.5: 连接服务器:psql -h localhost -p 5432 -U postgress -d testdb

5. select spcname from pg_tablespace;         //查看所有表空间 


————————————————
版权声明:本文为CSDN博主「水上冰石」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/jiao_zg/article/details/55101760

原文地址:https://www.cnblogs.com/xining/p/12841171.html