Home  >  Article  >  Database  >  What does the "delete from table" statement mean?

What does the "delete from table" statement mean?

藏色散人
藏色散人Original
2019-04-29 11:01:3520422browse

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

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 条件

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!

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