How do I differentiate database deletion statements from drop and delete and truncate ?, Droptruncate
1. delete: delete rows in the data table (you can delete a row or delete all rows without deleting the data table)
Delete a row: delete from data table name where column name = value;
Delete all rows: delete * from data table name
2. drop: delete a data table or database or data table Field
Delete database: drop database Name
Delete A data table (the table structure, attributes, and indexes will also be deleted): use Database Name
Drop table 1 Name and table 2 Name
Delete data table field (column): use Database Name
Alter table data table name
Drop column field name (column name)
3. truncate: delete data in the data table (only data in the data table, not the table)
Truncate table data table name
Additional:
Data deletion speed ranking: drop> truncate> delete
Remove: deletes database files.
Alter database Mydatabase1
Remove file mydatabasedomainlog