Difficulty: Easy
Correct Answer: EDIT [fileName]
Explanation:
Introduction:
SQLPlus supports external editing so that you can modify the current buffer or a script file using your preferred text editor. Knowing the correct command improves productivity and integrates your workflow with version-controlled scripts.
Given Data / Assumptions:
Concept / Approach:
The SQLPlus EDIT command launches the configured external editor. If you supply a filename, SQLPlus opens that file; otherwise, it opens the contents of the SQL buffer in a temporary file. After saving and closing the editor, you can use @ or START to run saved scripts, or LIST to view the buffer.
Step-by-Step Solution:
1) Type EDIT to open the buffer in the external editor, or EDIT file.sql to open a specific file.2) Make changes in the editor and save the file.3) Return to SQLPlus; use LIST to review buffer content or @file.sql to execute.4) Confirm that EDIT is the correct command (not OPEN/SHOW/ALTER).
Verification / Alternative check:
SQLPlus help (HELP EDIT) documents the behavior and optional filename argument.
Why Other Options Are Wrong:
Common Pitfalls:
Forgetting to set the editor with DEFINE _EDITOR or the environment variable; EDIT then launches the default editor for the platform.
Final Answer:
EDIT [fileName]
Discussion & Comments