Delete table statement (drop truncate delete)

grammar

Delete content

Whether to delete the definition

Whether to release space

Delete table structure

Note

drop table table_name

delete

delete

freed

delete

After removal, the table does not exist

truncate table table_name

delete

Do not delete

freed

Do not delete

Only clear table of contents, there

delete table table_name

delete

Do not delete

Does not release, use the data delete remove and then add, you can see after adding id identification discontinuous

Do not delete

Only definition content, delete the data line by line, inefficiency

delete table table_name where 条件

Delete data in accordance with conditions

Do not delete

Does not release, use the data delete remove and then add, you can see after adding id identity does not continuous.

Do not delete

 

Guess you like

Origin www.cnblogs.com/mianbaoshu/p/10945495.html