Home > Database > SQL > body text

What is the sql command to delete the testdb database?

Release: 2019-12-18 13:57:13
Original
7166 people have browsed it


What is the sql command to delete the testdb database?

The command to delete the testdb database is: DROP DATABASE testdb;

In SQL, when you need to delete the created database , you can use the DROP DATABASE or DROP SCHEMA statement. The syntax format is:

DROP DATABASE [ IF EXISTS ] <数据库名>
Copy after login

The syntax description is as follows:

: Specify the name of the database to be deleted.

IF EXISTS: Used to prevent errors from occurring when the database does not exist.

DROP DATABASE: Delete all tables in the database and delete the database at the same time. Be very careful when using this statement to avoid mistaken deletions. If you want to use DROP DATABASE, you need to obtain database DROP permission.

For more database knowledge, please pay attention to the SQL Database Tutorial column.

The above is the detailed content of What is the sql command to delete the testdb database?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template