CREATE DATABASE

In PostgreSQL CREATE DATABASE statement is used for creating new database in server. Login to PostgreSQL database command prompt using command ‘sudo -u postgres psql‘ from terminal. Syntax :- CREATE DATABASE database_name; Example :- Login to your PostgreSQL server using command line. You will get PostgreSQL database prompt like postgres=# . Now use CREATE DATABASE statement to create database. postgres=# CREATE DATABASE mydb; If everything goes successfully, you will get output like “CREATE DATABASE“. To confirm that database is create use l or list command from database command prompt to…

Read More