Difficulty: Medium
Correct Answer: CONNECT, DESCRIBE, SPOOL, START
Explanation:
Introduction / Context:
This question focuses on SQL*Plus, the classic Oracle command line tool. SQL*Plus has its own set of commands that control the client environment, execute scripts, and format output. These commands are different from SQL statements such as SELECT or INSERT, even though they are often used in the same session. Understanding which commands belong to SQL*Plus is important for administration and scripting.
Given Data / Assumptions:
Concept / Approach:
SQL*Plus commands include CONNECT to log in to the database, DESCRIBE to display the structure of objects, SPOOL to send output to a file, and START or @ to run script files. These are not SQL language statements and will not be understood if sent directly through a pure SQL interface. In contrast, SELECT, INSERT, UPDATE, and DELETE are SQL language statements executed by the server, not client environment commands.
Step-by-Step Solution:
Step 1: Recall basic SQL*Plus commands such as CONNECT, DESCRIBE (DESC), SPOOL, and START that control the session and scripts.
Step 2: Review option A and see that it contains CONNECT, DESCRIBE, SPOOL, and START, which are classic SQL*Plus commands.
Step 3: Examine option B, which lists SELECT, INSERT, UPDATE, and DELETE, which are SQL DML statements, not SQL*Plus client commands.
Step 4: Option C lists DDL statements like CREATE and DROP, again part of SQL, not client environment configuration.
Step 5: Option D lists logical operators used in WHERE clauses and not commands at all.
Verification / Alternative check:
You can verify by running these commands in a non SQL*Plus client that accepts only SQL statements. Commands like CONNECT and SPOOL may not be recognized there, because they are specific to SQL*Plus. Also, Oracle documentation clearly separates SQL*Plus commands from SQL statements, showing them in different chapters. This confirms the classification given in option A.
Why Other Options Are Wrong:
Option B is wrong because it lists core SQL language statements, which are processed by the database engine. Option C again lists SQL DDL statements, not SQL*Plus utilities. Option D contains logical operators that are used inside SQL expressions, not standalone commands. None of these are primarily concerned with controlling the SQL*Plus client environment.
Common Pitfalls:
A frequent pitfall is to assume that every command typed into SQL*Plus is a SQL statement. New users sometimes try to run SQL*Plus commands through other tools and receive errors. It is also common to forget that formatting commands such as COLUMN or SET are SQL*Plus features, not part of standard SQL. Knowing which tools support which commands is important for portability.
Final Answer:
The basic SQL*Plus commands include CONNECT, DESCRIBE, SPOOL, and START, which are all client side commands listed together in the correct option.
Discussion & Comments