TRUNCATE Command in SQL | Why It's Faster than DELETE | Learning with Seerat
Автор: Learning With Seerat
Загружено: 2025-07-06
Просмотров: 68
Описание:
Welcome to Learning with Seerat! 🌸
In this video, we’ll explain the TRUNCATE command in SQL — what it does, why it’s faster than DELETE, and why you can't use WHERE clause with TRUNCATE.
Why is TRUNCATE faster than DELETE?
TRUNCATE is faster because it doesn't delete rows one-by-one.
It deallocates entire data pages in one go, while DELETE logs each row individually.
TRUNCATE takes a table-level lock, whereas DELETE may use row-level locks.
It doesn’t fire triggers and doesn’t maintain transactional overhead per row.
✅ TRUNCATE = Fast bulk removal
✅ DELETE = Conditional row-by-row removal
If you find this helpful, don’t forget to LIKE, COMMENT, and SUBSCRIBE to “Learning with Seerat” for more SQL, Python, and Programming tutorials!
#SQL #TruncateCommand #LearningWithSeerat #Database #InterviewQuestion
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: