Home > Database > Mysql Tutorial > What is the purpose of the MySQL DROP command?

What is the purpose of the MySQL DROP command?

PHPz
Release: 2023-09-07 17:21:02
forward
1281 people have browsed it

MySQL DROP 命令的用途是什么?

As the name suggests, it is used to completely delete the table from the database.

Syntax

Drop table table_name;
Copy after login

Example

mysql> Drop table Student;
Query OK, 0 rows affected (0.09 sec)
Copy after login

The above query completely deletes the "Student" table from the database. We can observe that MySQL returns an error message after running the following query -

mysql> Select * from Student;
ERROR 1146 (42S02): Table 'query.student' doesn't exist
Copy after login

The above is the detailed content of What is the purpose of the MySQL DROP command?. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
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