Sql Query | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

Sql Query

Whats the difference between delete drop and truncate in SQl?

31st Mar 2019, 8:21 AM
Abhay Jindal
Abhay Jindal - avatar
2 Respostas
+ 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
31st Mar 2019, 8:46 AM
Vijay(v-staršŸŒŸ)
Vijay(v-staršŸŒŸ) - avatar