DROP DATABASE in MariaDB

DROP DATABASE
To drop, eliminate, delete or remove a particular MariaDB database, from multiple available databases, the DROP database command is used.

Syntax:

DROP DATABASE name;

Parameters:
name: It is used to specify the name of the database to be dropped.

Example:

DROP DATABASE students;

Explanation:
The ‘students’ database will be removed. In order to check all the available databases and to confirm the removal process, below query, should be executed.
SHOW DATABASES;
It will display the names of all the available databases after the removal.

DROP Database using Management Studio:
To drop a database using management studio tool, select the database to delete and right-click on that.
Example:

  • To delete the ‘students’ database, select the database and right-click on that.
  • Click on “Drop” from the dropdown menu.
  • Click on OK from the generated pop-up box.

The ‘students’ database will be removed. In order to check all the available databases and to confirm the removal process, below query, should be executed.
SHOW DATABASES;
It will display the names of all the available databases after the removal.

Please Share