A database is a collection of data and data is organised in the form of tables. so we can also say database is collection of tables or views or others. we can create any number of tables in the database and each table belongs to a database.
Create a database using the CREATE DATABASE statement.
It throws an error if database already exits.
To avoid the error, use the IF NOT EXISTS option with the CREATE DATABASE statement.
CREATE DATABASE database_name;
CREATE DATABASE IF NOT EXISTS database_name;
Let's create a database name "EmployeeDB"
Query to display or show database:
please comment below if you have any issues or need help in mysql database query