+ 1
Sql Query
Whats the difference between delete drop and truncate in SQl?
2 ответов
+ 13
The SQL TRUNCATE TABLE statement is used to remove all records from a table. It performs the same function as a DELETE statement without a WHERE clause.
If you truncate a table, the TRUNCATE TABLE statement can not be rolled back in some databases.
Syntax : TRUNCATE TABLE table_name;
Delete is use to delete all the rows in the table
Syntax :
Delete from tablename;
Drop is use delete table itself...
Syntax : drop table tablename
+ 5
Please try to search first before posting a question to help reduce duplicate questions. Hope you understand 👍
https://www.sololearn.com/Discuss/1072740/what-is-the-difference-between-truncate-and-drop-statements
https://www.sololearn.com/Discuss/347379/delete-truncate-and-drop-in-sql
https://www.sololearn.com/Discuss/1075839/what-is-the-difference-between-truncate-drop-and-delete-statement
https://www.sololearn.com/Discuss/1367669/what-is-the-use-of-truncate-function-in-mysql
https://www.sololearn.com/Discuss/175563/what-is-the-difference-between-delete-truncate
https://www.sololearn.com/Discuss/185762/what-is-the-difference-between-delete-and-truncate-commands
https://www.sololearn.com/Discuss/22957/difference-between-drop-delete-and-truncate
https://www.sololearn.com/Discuss/88324/what-is-the-difference-between-truncate-and-drop
https://www.sololearn.com/Discuss/31557/what-is-the-difference-between-delete-and-truncate-can-any-one-explain
https://www.sololearn.com/Discuss/6777/please-explain-truncate