ORACLE SQL REVIEW QUESTIONS VERSION 2 CH 3
MANIPULATING DATA AND CH 4 RESTRICTING AND
SORTING DATA | FROM QUESTION TO PERFECTION|
STUDY WITH CONFIDENCE!
Course Code:
Course Title:
Programme:
Academic Year: 2026/2027
Duration: 2 Hours
Total Marks: 70%
Candidate Instructions:
1) Write your Registration Number on every answer booklet used.
2) Answer ALL questions in Section A and ANY TWO (2) questions in Section B.
3) Read each question carefully before answering.
4) Begin each question on a new page.
5) The marks for each question are indicated in brackets.
6) This paper consists of several printed pages, including this page.
7) Ensure your copy is complete before the examination begins.
8) Unauthorized materials and communication with other candidates are not permitted.
Turn Over.
APPHIA – Crafted with Care and Precision for Academic Excellence.
1
, 3.1 Truncate Data
delete has a bunch of detailed processing like:
1 Answer: respecting indexes and triggers and when it has them it deletes on a row by row basis
ok, what if we just drop the whole flippin table?
2 Answer: it drops the tables indexes and triggers
Alright what does the TRUNCATE TABLE statement do?
3 Answer: -removes all rows in a given table
-removes all data in the associated indexes
-fires no DML triggers (cause its not DML)
what are the advantages?
does it require anything?
4 Answer: -leaves the table and index structure intact
-leaves all dependencies intact (such as child tables)
also
-does not leverage undo space like DELETE would
-performs an implicit commit
-requires the DROP_ANY_TABLE privilege
because of the implicit commit...
5 Answer: -cant be rolled back
-does not work with FLASHBACK_TABLE
-is DDL
syntax?
6 Answer: TRUNCATE TABLE VENDORS;
TABLE required
Recursively Truncate Child Tables.
how do we recursively truncate all dependent child tables?
7 Answer: TRUNCATE TABLE VENDORS CASCADE;
what does the CASCADE clause generally do?
APPHIA – Crafted with Care and Precision for Academic Excellence.
2
MANIPULATING DATA AND CH 4 RESTRICTING AND
SORTING DATA | FROM QUESTION TO PERFECTION|
STUDY WITH CONFIDENCE!
Course Code:
Course Title:
Programme:
Academic Year: 2026/2027
Duration: 2 Hours
Total Marks: 70%
Candidate Instructions:
1) Write your Registration Number on every answer booklet used.
2) Answer ALL questions in Section A and ANY TWO (2) questions in Section B.
3) Read each question carefully before answering.
4) Begin each question on a new page.
5) The marks for each question are indicated in brackets.
6) This paper consists of several printed pages, including this page.
7) Ensure your copy is complete before the examination begins.
8) Unauthorized materials and communication with other candidates are not permitted.
Turn Over.
APPHIA – Crafted with Care and Precision for Academic Excellence.
1
, 3.1 Truncate Data
delete has a bunch of detailed processing like:
1 Answer: respecting indexes and triggers and when it has them it deletes on a row by row basis
ok, what if we just drop the whole flippin table?
2 Answer: it drops the tables indexes and triggers
Alright what does the TRUNCATE TABLE statement do?
3 Answer: -removes all rows in a given table
-removes all data in the associated indexes
-fires no DML triggers (cause its not DML)
what are the advantages?
does it require anything?
4 Answer: -leaves the table and index structure intact
-leaves all dependencies intact (such as child tables)
also
-does not leverage undo space like DELETE would
-performs an implicit commit
-requires the DROP_ANY_TABLE privilege
because of the implicit commit...
5 Answer: -cant be rolled back
-does not work with FLASHBACK_TABLE
-is DDL
syntax?
6 Answer: TRUNCATE TABLE VENDORS;
TABLE required
Recursively Truncate Child Tables.
how do we recursively truncate all dependent child tables?
7 Answer: TRUNCATE TABLE VENDORS CASCADE;
what does the CASCADE clause generally do?
APPHIA – Crafted with Care and Precision for Academic Excellence.
2