Difficulty: Easy
Correct Answer: Correct
Explanation:
Introduction / Context: SQLPlus can execute SQL and PL/SQL scripts stored in files. Knowing the conventional file extension helps with tooling, editors, and discoverability. This question asks whether “.sql” is the default and customary extension for SQLPlus scripts.
Given Data / Assumptions:
Concept / Approach: In SQLPlus usage, .sql is the de facto and traditional extension for script files. When you invoke @myscript without an extension, SQLPlus attempts myscript.sql in the current or SQLPATH directories. Other extensions can be used if fully specified (for example, @myscript.sqlx), but the default behavior and tooling expectations center around .sql. Therefore, stating that “the default extension for SQLPlus is .sql” is correct in everyday Oracle practice.
Step-by-Step Solution:
Create a file named demo.sql with SQL statements.In SQLPlus, run @demo → SQLPlus locates demo.sql and executes it.Rename the file with a nonstandard extension and try @demo → not found unless you supply the extension.Conclusion: .sql is the default expected extension.Verification / Alternative check: Check SQLPlus documentation for the START/@ command behavior and SQLPATH lookup; verify on your environment by experimenting with file names.
Why Other Options Are Wrong:
Common Pitfalls: Forgetting SQLPATH; placing scripts in directories not on the path; assuming the client will guess a non-.sql extension.
Final Answer: Correct
Discussion & Comments