Comparison of MySQL and PostgreSQL commands

Source: Internet
Author: User
Tags postgresql commands psql
Compare the common operations of the two databases. Use the built-in client programs. MySQL command line: mysql-u user name-h host address-P port number database name-pPostgreSQL command line: psql-U user name-h host address-p port number database name Operation comparison: mysqlpsqlSHOWDATABASES; lUSEdb-name;

Compare the common operations of the two databases. Use the built-in client programs. MySQL command line: mysql-u user name-h host address-P port number database name-p PostgreSQL command line: psql-U user name-h host address-p port number database name Operation comparison: mysql psqlSHOW DATABASES; \ lUSE db-name;

Compare the common operations of the two databases. Use the built-in client programs.

MySQL command line:

Mysql-u username-h host address-P port number database name-p

PostgreSQL command line:

Psql-U username-h host address-p port number Database Name

Operation comparison:

Mysql psqlSHOW DATABASES; \ lUSE db-name; \ c db-nameSHOW TABLES; \ dSHOW USERS; \ duSHOW COLUMNS; \ d table-nameSHOW PROCESSLIST; SELECT * FROM pg_stat_activity; SELECT now () \ G \ x can enable and disable functions similar to \ g source/path. SQL \ I/path. sqlLOAD data infile... \ copy... \ h \?

Original article address: MySQL & PostgreSQL small command comparison, thanks to the original author for sharing.

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.