A DIFFERENCE BETWEEN DELETE AND TRUNCATE IN SQL

November 2018
Vol-4, Issue-6
Paper ID: 9261
ISSN: 2395-4396
Downloads: 78
Download PDF

Abstract & Details

Research Area
Computer Engineering
Keywords
DDL DML DQL DCL TCL
Abstract
While working with the database we often need to delete data, sometimes to create more space, sometimes just remove all data to make table ready for next day's transaction or sometimes just selectively remove stale data. SQL provides a couple of handy commands to remove data e.g. truncate, delete and drop. The last one is bit different because instead of removing data it just deletes table. What is the difference between truncate and delete command in SQL or when to use truncate vs delete is one of the most frequently asked SQL interview question? Knowledge of this critical command is not only useful for interviews, but also while working with a big database with a large number of records, especially while writing SQL scripts for purging transaction databases. An Incorrect choice of SQL command can result is either very slow processor can even blow up the log segment; if too much data needs to be removed and log segment is not enough. That's why it's critical to know when to use truncate and delete command in SQL. In this paper, we will first see few differences between them, and based upon them, you should be able to find out when DELETE is a better option for removing data or TRUNCATE should be used to purge tables.

Author Information

# Name Institute / Affiliation
1 Brijesh Patel S.B. Polytechnic
2 Jigisha Trivedi S.B.POLYTECHNIC

How to Cite

Use the following formats to cite this article in your research.

APA Style
Patel, Brijesh & Trivedi, Jigisha (2018). A DIFFERENCE BETWEEN DELETE AND TRUNCATE IN SQL. International Journal of Advance Research and Innovative Ideas In Education, 4(6), 37-43.
MLA Style
Patel, Brijesh, and Jigisha Trivedi. "A DIFFERENCE BETWEEN DELETE AND TRUNCATE IN SQL." International Journal of Advance Research and Innovative Ideas In Education, vol. 4, no. 6, 2018, pp. 37-43.
IEEE Style
Brijesh Patel and Jigisha Trivedi, "A DIFFERENCE BETWEEN DELETE AND TRUNCATE IN SQL," International Journal of Advance Research and Innovative Ideas In Education, vol. 4, no. 6, pp. 37-43, 2018.
Vancouver Style
Patel Brijesh, Trivedi Jigisha. A DIFFERENCE BETWEEN DELETE AND TRUNCATE IN SQL. International Journal of Advance Research and Innovative Ideas In Education. 2018;4(6):37-43.
Harvard Style
Patel, Brijesh & Trivedi, Jigisha (2018) 'A DIFFERENCE BETWEEN DELETE AND TRUNCATE IN SQL', International Journal of Advance Research and Innovative Ideas In Education, 4(6), pp. 37-43.
Chicago Style
Patel, Brijesh and Jigisha Trivedi. "A DIFFERENCE BETWEEN DELETE AND TRUNCATE IN SQL." International Journal of Advance Research and Innovative Ideas In Education 4, no. 6 (2018): 37-43.
Turabian Style
Patel, Brijesh and Jigisha Trivedi. "A DIFFERENCE BETWEEN DELETE AND TRUNCATE IN SQL." International Journal of Advance Research and Innovative Ideas In Education 4, no. 6 (2018): 37-43.

Export Citation

Related Research

PReFace : AI -Assisted Plausible Facial Restoration and Damage Reconstruction System
Syeda Arbeena Kausar et al. 2026 Computer Science and Engineering (Computer Vision, Deep Learning and Image Processing)
Download PDF
Customer Churn Prediction Using Machine Learning
Dr. Roshni Khlhe et al. 2026 Machine Learning, Artificial Intelligence, Data Analytics, and Customer Churn Prediction.
Download PDF
Automated web vulnerability scanner
Jitendra Sahu et al. 2026 Computer science
Download PDF
BLOOD BANK DEMAND PREDICTION SYSTEM: MACHINE LEARNINGBASED BLOOD DEMAND FORECASTING
Uday Dharmapal Wankhede et al. 2026 Computer Science & Engineering
Download PDF