Xin Xing sorts out some common non-SQL operations in postgresql. Xin Xing postgresql
The operations mentioned here are performed after we use psql to enter the postgresql client. They are not SQL statements, but they are usually important. Below are some common sorting operations:
(1) list all databases. Use the \ l command or the \ list Command. Note that the letter l is not a number 1.
(2) to switch the database, we use the \ c database name method, which is equivalent to the use database name in MySQL.
(3) list all tables in the current database. We use the \ d command, which is equivalent to the show tables command in MySQL.
(4) Exit the current user. We use the \ q command, which is equivalent to the quit or \ q command in MySQL.
(5) We use the \ d table name to view the fields in the table. It is equivalent to the show columns from table name in MySQL.
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.