Exam 1z0-071 All QuestionsBrowse all questions from this exam
Question 9

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

    Correct Answer: A, E

    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
devmlOptions: AE

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.

heoj10272Options: AE

AE correct answers

Artur1991Options: AE

AE are the correct answers

alelejajaOptions: AE

A, E correct answers

Chandra1104Options: AE

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)