Difficulty: Easy
Correct Answer: Valid (with a single statement, ; and / both execute it effectively)
Explanation:
Introduction / Context:
In SQLPlus, a semicolon ends a SQL statement during entry and immediately executes it. A forward slash on a new line executes the current buffer. When there is only one statement in play and no ambiguity, both actions result in the same execution of that statement, hence they appear equivalent from the user’s point of view.
Given Data / Assumptions:
Concept / Approach:
Typing a semicolon concludes and runs the statement immediately. Alternatively, pressing Enter to finish the statement and then typing / will execute the same buffered text. While PL/SQL often requires the slash after END;, for a simple single SQL statement both methods execute the same content, producing identical results when no other text is buffered.
Step-by-Step Solution:
Verification / Alternative check:
Run with ; and then with / and compare results—they match for single, unambiguous statements. For PL/SQL, ; terminates internal statements; / dispatches the whole block.
Why Other Options Are Wrong:
Common Pitfalls:
Accidentally re-running an old buffer with /; misunderstanding that PL/SQL blocks need / to execute after END;.
Final Answer:
Valid (with a single statement, ; and / both execute it effectively)
Discussion & Comments