1z0-071 Exam QuestionsBrowse all questions from this exam

1z0-071 Exam - Question 9


Which two statements are true about TRUNCATE and DELETE? (Choose two.)

Show Answer
Correct Answer: AE

DELETE can use a WHERE clause to determine which row(s) should be removed, allowing for selective deletion of data. Additionally, the result of a DELETE operation can be undone by issuing a ROLLBACK, as DELETE is a Data Manipulation Language (DML) statement and changes made by DML statements are logged for the possibility of reversal. TRUNCATE, on the other hand, does not use a WHERE clause and is a Data Definition Language (DDL) statement, making its results non-rollbackable and affecting the entire table instead of selective rows.

Discussion

5 comments
Sign in to comment
devmlOptions: AE
Jan 25, 2023

A. DELETE can use a WHERE clause to determine which row(s) should be removed. ---> Is correct B. TRUNCATE can use a WHERE clause to determine which row(s) should be removed. ---> Its wrong bcoz truncate will delete every rows in a table except the table definitions. C. TRUNCATE leaves any indexes on the table in an UNUSABLE state. ----> its wrong truncate will remove everything except table definition or skeleton of the table D. The result of a TRUNCATE can be undone by issuing a ROLLBACK.-----> Its wrong bcoz TRUNCATE is a ddl statement whereas it can be done for DELETE since its dml statement E. The result of a DELETE can be undone by issuing a ROLLBACK. ----> Its correct bcoz DELETE is DML statement and each delete of row are recorded in transaction log or the redo logs.

Artur1991Options: AE
Sep 4, 2022

AE are the correct answers

heoj10272Options: AE
Oct 11, 2022

AE correct answers

Chandra1104Options: AE
Mar 20, 2023

AE is the correct ans. With truncate we can not user where clause (B) with truncate even if we rollback data will not be rollback. (D)

alelejajaOptions: AE
May 23, 2024

A, E correct answers