Sinsing some of the non-SQL operations common in PostgreSQL

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.