The CREATE DATABASE Statement is used to create a database. After creating a database, we can create several other database objects (tables, views, procedures etc.) into it. The user should have admin privileges for creating database.:
Let's see the syntax of SQL CREATE DATABASE:
SQL CREATE DATABASE Statement: CREATE DATABASE database_name [COLLATE collation_name ]
In the above query,
This, collation_name, is an optional field and if not provided then Default Collation is assigned to database.
In MySQL, you need to create database first then table. But, you don't need to create database in Oracle. In Oracle database, you can create table directly.
You can also rename, drop and select database that is covered in next pages.
We should always remember that database name should be unique in the RDBMS.