Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in SQL by (55.5k points)

Can anyone tell me the differences between delete and truncate in SQL?

1 Answer

0 votes
by (119k points)

DELETE is A DML command that is used to delete specific data. Truncate is a DDL command that is used to delete entire data of the table. So, we can use where clause in DELETE but not in TRUNCATE command. The changes made from DELETE command can be rolled back but cannot rollback from TRUNCATE. In comparison to performance, Truncate is faster than delete command.

The difference between Truncate and delete commands is the most frequent question in SQL interviews. I recommend to check out this SQL interview questions blog by Intellipaat for more such FAQs in SQL interviews.

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Oct 20, 2020 in SQL by dev_sk2311 (43.2k points)
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers

500 comments

94.7k users

Browse Categories

...