Home >Database >Mysql Tutorial >What is the sql statement to delete the database?

What is the sql statement to delete the database?

醉折花枝作酒筹
醉折花枝作酒筹Original
2021-07-02 10:23:3235853browse

SQL statements are: 1. Delete the database, "drop database database name" and "truncate table table name" statements; 2. Delete the table, "drop table table name" statement; 3. Delete data, "delete" "from table name where condition" statement.

What is the sql statement to delete the database?

The operating environment of this tutorial: windows7 system, mysql8 version, Dell G3 computer.

How to write the sql statement to delete the database

drop database database name--delete the database

drop table table name--delete the table

delete from Table name where condition - deleting data

truncate table table name is also used to delete the database. But it can cut the sequence. You will know this by comparing it with DELETE.

Related learning recommendations:mysql tutorial(video)

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

Statement:
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