The operation described here is what we do after we use Psql to enter PostgreSQL's client, they are not SQL statements, but they are often important, and here are some common grooming operations:
(1) List all the databases, we use the \l command or the \list command , note that this is the letter L, not the number 1.
(2) Switching the database, we practical \c database name , it is equivalent to MySQL inside the use database name.
(3) List all the tables under 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) View the fields in the table we use the \d table name , which is equivalent to the Show columns from table name in MySQL.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Sinsing some of the non-SQL operations common in PostgreSQL