Difficulty: Easy
Correct Answer: Incorrect
Explanation:
Introduction / Context: Understanding how SQLPlus terminates and executes statements is essential for accurate script execution. Unlike some shells where Enter triggers immediate action, SQLPlus requires a statement terminator or a specific execution command. This question asks whether pressing Enter alone executes the SQL.
Given Data / Assumptions:
Concept / Approach: Pressing Enter simply starts a new line and does not execute the SQL in SQLPlus. Execution occurs when SQLPlus receives a recognized terminator. For typical SQL (SELECT, DDL, DML), a semicolon ends and submits the statement. For PL/SQL blocks (DECLARE…BEGIN…END;), the block ends with a semicolon and is executed when you enter a slash on a separate line. The slash instructs SQLPlus to send the current buffer to the database.
Step-by-Step Solution:
Type: SELECT 1 FROM dualPress Enter → nothing executes; SQLPlus awaits a terminator.Type: ; and press Enter → now SQLPlus submits and shows results.For PL/SQL, end the block with ; inside the block, then / on the next line to run.Verification / Alternative check: Observe the SQL buffer behavior using LIST; you will see the text remains until you terminate and execute.
Why Other Options Are Wrong:
Common Pitfalls: Forgetting the slash after PL/SQL; assuming Enter executes; mixing SQLPlus with GUI client behaviors.
Final Answer: Incorrect
Discussion & Comments