Home > Database > Mysql Tutorial > What does the 'delete from table' statement mean?

What does the 'delete from table' statement mean?

藏色散人
Release: 2020-09-15 09:35:34
Original
20474 people have browsed it

The "delete from table" statement means clearing the records in the data table. Delete means to delete records in the table conditionally. If no condition is added, it means to delete all records in the table. The specific syntax is: [DELETE FROM TABLE WHERE condition].

What does the 'delete from table' statement mean?

In SQL, "delete from table" means to clear the records in the table, and DELETE is to conditionally delete the data in the table.

(Recommended tutorial: mysql video tutorial)

The specific syntax is:

DELETE FROM TABLE WHERE 条件
Copy after login

Similarly, there is also a TRUNCATE TABLE TABLENAME statement, which is the entire table If you do not commit the deletion, the data will also be deleted, and the table will still exist.

In short, when using DELETE, only the data will be deleted; the structure of the table and all attributes of the table are still retained, such as field attributes and indexes.

The above is the detailed content of What does the 'delete from table' statement mean?. 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