Important PostgreSQL Commands

Its all Here >>>

Introduction to PostgreSQL

PostgreSQL is an object-relational database system with a solid reputation for stability, robustness, and performance. It is used to store, manipulate and display data in an application.

PostgreSQL Commands List

Establishes a connection with the database under the control of the specified user.    psql -d database -U  user -W   Here, -d = specifies database name and -U = specifies database user.

1. Connect to PostgreSQL Database

Switch the connection to a new database while logged in with an existing user.  \c dbname username

2. Change the database connection to a new one

Display a list all available databases in the current  PostgreSQL database server.   \l

3. List available database

Display a list all available tables in the current database.   \dt

4. List available table

Describe a table, such as a column, data type, column modifiers, and so on.   \d table_name

5. Describe table

Display a list all available schemas in the currently connected database.   \dn

6. List available schema

Display a list of available functions in the current database.   \df

7. List available function

For a Complete List of PostgreSQL Commands with examples.

Click Here