Switch Database in PostgreSQL

We can Switch Database in PostgreSQL using \c or \connect.

1) \c Database_Name
2) \connect Database_Name

Examples:

k2info=# \connect edb
You are now connected to database “edb” as user “enterprisedb”.
edb=# \c k2info
You are now connected to database “k2info” as user “enterprisedb”.
k2info=#

You can leave a response, or trackback from your own site.

Leave a Reply

Powered by k2schools