SQL-92 Basics — Meaning of the Asterisk () in SELECT According to the SQL-92 standard, when you write SELECT * from a single table, what does the asterisk () specify?

Difficulty: Easy

Correct Answer: All columns of the table are to be returned.

Explanation:


Introduction:
The asterisk in a SELECT statement is one of the first pieces of SQL syntax developers learn. However, its exact meaning can be confused with filtering semantics. This question targets the correct interpretation under SQL-92 when a single table is queried.


Given Data / Assumptions:

  • Query shape: SELECT * FROM TableName [WHERE ...]
  • Focus is on the projection (columns), not selection (rows) criteria.
  • Standard SQL behavior is assumed.


Concept / Approach:
In SQL, SELECT controls which columns are returned (projection), while WHERE controls which rows are returned (selection). The symbol * in the projection list means include every column defined on the referenced table(s). It does not change row filtering rules or relax conditions in WHERE clauses.


Step-by-Step Solution:
1) Identify that * appears in the SELECT list, not in the WHERE clause.2) Conclude that its effect is on columns returned, not rows chosen.3) Therefore, SELECT * returns all columns for each row that satisfies the WHERE clause.


Verification / Alternative check:
Running SELECT * in any DBMS returns the full set of columns, matching catalog definitions, subject to permissions and view expansion for views.


Why Other Options Are Wrong:

  • All records meeting criteria: That is the role of WHERE, not *.
  • Partial criteria met: SQL does not define a notion of partial criteria as a projection effect.
  • None of the above / primary key only: Both contradict standard behavior.


Common Pitfalls:
Using * in production can cause brittle code if schemas change and can transfer unnecessary data; explicit column lists are preferable for stability and performance.


Final Answer:
All columns of the table are to be returned.

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion