Home > Database > Mysql Tutorial > body text

What is the sql statement to delete the database?

醉折花枝作酒筹
Release: 2021-07-02 10:23:32
Original
35803 people have browsed it

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!

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