How to create database in SQL?

  • CREATE Database:

It is used to create a new database. The syntax of it is:
Syntax:

CREATE DATABASE DatabaseName;

Database name will be unique.
Example:
Create a database of students?

CREATE DATABASE Student;

 

  • DROP Database:

It is used to delete an existing database. The syntax for this is:
Syntax:

DROP DATABASE DatabaseName;

It deletes the whole structure along with the content of the database.
Example:
If you want to delete the database student, then

DROP DATABASE Student;

Leave a Reply

Your email address will not be published. Required fields are marked *

Solve : *
13 + 29 =