What is the difference between truncate and drop ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is the difference between truncate and drop ?

6th Nov 2016, 6:33 AM
Raghunath S
Raghunath S - avatar
3 Answers
+ 4
drop deletes the data and table reference truncate just deletes the data. After a truncate the table reference still remains.
6th Nov 2016, 6:59 AM
Robert McC
Robert McC - avatar
+ 1
truncate doesn't delete the table structure where as drop deletes the table structure along with any triggers on them
7th Nov 2016, 6:15 PM
Ranjan Singh
Ranjan Singh - avatar
0
truncate only delete the data in the table where as drop delets whole table that means all data with structures
8th Nov 2016, 2:55 PM
smruti ranjanpradhan
smruti ranjanpradhan - avatar