engineering computer science MCQ #759

What is the difference between 'DELETE' and 'TRUNCATE'?

engineering computer science MCQ #759

  1. Question 1

    Q1. What is the difference between 'DELETE' and 'TRUNCATE'?

    • A) DELETE is faster, TRUNCATE is slower
    • B) DELETE logs changes, TRUNCATE does not log changes
    • C) DELETE is used for tables, TRUNCATE is used for views
    • D) DELETE is used for views, TRUNCATE is used for tables

    Answer: DELETE logs changes, TRUNCATE does not log changes

    Explanation: DELETE logs changes, allowing rollback, while TRUNCATE does not log changes and is generally faster, but cannot be rolled back.