Xin Xing sorts out some common non-SQL operations in postgresql. Xin Xing postgresql

Source: Internet
Author: User
Tags postgresql client

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.

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.