Which three are true about the SQL statement?

Evaluate the SQL statement:
<code>
TRUNCATE TABLE DEPT;
</code>

Which three are true about the SQL statement? (Choose three.)

Evaluate the SQL statement:
<code>
TRUNCATE TABLE DEPT;
</code>

Which three are true about the SQL statement? (Choose three.)

A.
It releases the storage space used by the table.

B.
It does not release the storage space used by the table.

C.
You can roll back the deletion of rows after the statement executes.

D.
You can NOT roll back the deletion of rows after the statement executes.

E.
An attempt to use DESCRIBE on the DEPT table after the TRUNCATE statement executes will
display an error.

F.
You must be the owner of the table or have DELETE ANY TABLE system privileges to truncate
the DEPT table

Explanation:
A: The TRUNCATE TABLE Statement releases storage space used by the table,
D: Can not rollback the deletion of rows after the statement executes,
F: You must be the owner of the table or have DELETE ANY TABLE system privilege to truncate
the DEPT table.
Incorrect answer:
Cis not true
Dis not true
Eis not true
Refer: Introduction to Oracle9i: SQL, Oracle University Study Guide, 8-18



Leave a Reply 14

Your email address will not be published. Required fields are marked *


lokesh

lokesh

Evaluate the SQL statement:

TRUNCATE TABLE DEPT;

A.
It releases the storage space used by the table.
D.
You can NOT roll back the deletion of rows after the statement executes.
F.
You must be the owner of the table or have DELETE ANY TABLE system privileges to truncate
the DEPT table

Igor

Igor

Ans.: A, D, E
F is wrong: To truncate a table, the table must be in your schema or you must have the DROP ANY TABLE system privilege.

Salam

Salam

A, D, F are the right answers.
I think there is a typo in F, so it should be DROP ANY TABLE instead of DELETE ANY TABLE.

Salam

Salam

Sorry the right answer is A, D, F
The DROP ANY TABLE system privilege is required to truncate a table in
another schema.

kqfflo

kqfflo

That is wrong, Salam.

Quote: “The DELETE ANY TABLE system privilege also allows you to delete rows from any table or table partition or from the base table of any view.” – which is, what we want to perform with the TRUNCATE statement. DROP TABLE is needed if we want to delete the table completely.

vijay

vijay

then how E is right?

TSEKOS

TSEKOS

NO E IS WRONG BUT there is a typing error

dames

dames

F is wrong, as mentioned before, because DROP ANY TABLE and not DELETE ANY TABLE system privilege is needed.

E is right because TRUNCATE is a DDL statement behaving similarly to DELETE :

SQL> CREATE TABLE DEPT
2 (“DEPARTMENT_ID” NUMBER(4),
3 “DEPARTMENT_NAME” VARCHAR2(30));

Table created.

SQL> INSERT INTO DEPT
2 VALUES (10, ‘IT’);

1 row created.

SQL> COMMIT;

Commit complete.

SQL> SELECT * FROM DEPT;

DEPARTMENT_ID DEPARTMENT_NAME
————- ——————————
10 IT

SQL> TRUNCATE TABLE DEPT;

Table truncated.

SQL> SELECT * FROM DEPT;

no rows selected

SQL> DESCRIBE DEPT;
Name Null? Type
—————————————– ——– —————————-

DEPARTMENT_ID NUMBER(4)
DEPARTMENT_NAME VARCHAR2(30)

SQL>

user

user

E is wrong. it will display the data from dept after its truncated with out
any error.

Cesar

Cesar

The correct answers are a d f

Bruno

Bruno

A D F
Passed the exam last week with 94%.

Annie

Annie

hey, congrats, could you tell me which dumps you had used to study from and if they were valid for the exam?

Venkat

Venkat

Hi Bruno,

Congratulations,

can u please tell us, which dumps have you referred for the Exam IZ0-051.