Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in SQL by (55.6k 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
0 votes
1 answer
0 votes
1 answer
asked Oct 20, 2020 in SQL by dev_sk2311 (45k points)

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...