Evaluate the set of SQL statements: CREATE TABLE dept (deptno NUMBER(2), dname VARCNAR2(14), loc VARCNAR2(13)); ROLLBACK; DESCRIBE DEPT What is true about the set?
-
The DESCRIBE DEPT statement returns an error ORA-04043: object DEPT does not exist
-
The ROLLBACK statement frees the storage space occupies by the DEPT table
-
The DESCRIBE DEPT statement displays the structure of the DEPT table
-
The DESCRIBE DEPT statement displays the structure of the DEPT table only if there is a COMMIT statement introduced before the ROLLBACK statement
DDL statements like CREATE TABLE perform an implicit COMMIT in Oracle. Therefore, the DEPT table is permanently created before the ROLLBACK executes, making ROLLBACK ineffective. The subsequent DESCRIBE DEPT command succeeds and displays the table structure. Option A is incorrect because the table exists, B is incorrect because ROLLBACK cannot undo DDL, and D is incorrect because no explicit COMMIT is needed.
In Oracle, DDL statements like CREATE TABLE cause an implicit COMMIT of any prior transaction and are themselves not undoable by ROLLBACK once executed. So even though 'ROLLBACK;' appears after CREATE TABLE, it has no effect on the already-committed table creation (the typo 'VARCNAR2' is presumably a transcription error for VARCHAR2 in the original statement). Since DEPT was created and committed before the ROLLBACK, DESCRIBE DEPT successfully displays its structure — matching the marked answer. It's not an ORA-04043 error (table does exist), the ROLLBACK doesn't free its storage (nothing to roll back), and it doesn't require an explicit COMMIT beforehand since DDL auto-commits.