SQL -Structured Query Language - SQL Database - Create Database Tutorial
To create a SQL database with any name, we can use a ' CREATE DATABASE ' statement.
Syntax-
The basic syntax of CREATE DATABASE statement is given below –
CREATE DATABASE DatabaseName;
For example-
If we want to create a database for employees, where we can store all the detail of employees like employee's names, locations, jobs, etc.
Then use the following syntax-
CREATE DATABASE employees;
You can try all examples in MySQL workbench.
Click here to install MySQL workbench.
- Open a query editor mark on the left side.
- Write a basic query such as ' create database employees '
- Click on execute (power symbol)
It will create a database of employees.
If the output shows a green mark then it is executed successfully.
If the database is still not showing click on refresh, marked in an image.