PostgreSQL Create Database
$count++; if($count == 1) { #include "../mobilemenu.php"; } if ($count == 2) { include "../sharemediasubfolder.php"; } ?>
You can use CREATE DATABASE command to create a new database in PostgreSQL.
postgres=# CREATE DATABASE COSMOS;
CREATE DATABASE
The above command will create a database with the name cosmos for us.To use a created database, use the \c followed by the database name.
postgres=# \c cosmos;
WARNING: Console code page (437) differs from Windows code page (1252)
8-bit characters might not work correctly. See psql reference
page "Notes for Windows users" for details.
You are now connected to database "cosmos" as user "postgres".
cosmos=#
Showing list of tables in PostgreSQL.We can use \dt command to get list of tables in PostgreSQL
cosmos=# \dt
Did not find any relations.