Within a PL/SQL block, which commands are allowed? Choose all that apply
-
SELECT
-
CREATE
-
DELETE
-
DROP
-
UPDATE
-
INSERT
Reveal answer
Fill a bubble to check yourself
A,C,E,F
Correct answer
Explanation
Within a PL/SQL block, only DML (Data Manipulation Language) commands like SELECT, INSERT, UPDATE, and DELETE are allowed. DDL (Data Definition Language) commands like CREATE and DROP cannot be used directly in PL/SQL - they require dynamic SQL.
AI explanation
PL/SQL blocks freely support DML statements — SELECT, INSERT, UPDATE, and DELETE — because these operate on data and integrate naturally with PL/SQL's procedural control flow. DDL statements like CREATE and DROP are not allowed directly in a PL/SQL block; they can only be executed indirectly through dynamic SQL (EXECUTE IMMEDIATE), which is why those two are excluded from the correct set.