Difficulty: Easy
Correct Answer: Correct
Explanation:
Introduction / Context:
Knowing how statements are terminated and executed is essential for reliable scripting. SQLPlus uses specific terminators to submit commands to the database. This question evaluates the role of the semicolon in ending and executing SQL statements.
Given Data / Assumptions:
Concept / Approach:
In SQLPlus, a semicolon ends the SQL statement and causes it to be sent to the database engine for execution. For PL/SQL blocks, semicolons terminate individual statements within the block, but the block itself is executed when you enter a slash on a new line. For plain SQL, however, the semicolon both terminates and triggers execution. Thus, saying that “the semicolon terminates a SQL statement (and executes it)” is correct for SQL statements in SQLPlus.
Step-by-Step Solution:
Verification / Alternative check:
Try a quick SELECT 1 FROM dual; in SQL*Plus and confirm the semicolon triggers execution. Then type a PL/SQL block and note that execution requires slash on a new line.
Why Other Options Are Wrong:
Common Pitfalls:
Forgetting the slash for PL/SQL; assuming Enter alone executes.
Final Answer:
Correct
Discussion & Comments