Bird
0
0

Why is it necessary to alias a subquery in the FROM clause in SQL?

medium📝 Conceptual Q10 of 15
SQL - Subqueries
Why is it necessary to alias a subquery in the FROM clause in SQL?
ABecause aliasing encrypts the subquery result
BBecause the SQL standard requires every derived table to have a name for reference
CBecause aliasing creates a permanent table in the database
DBecause aliasing improves query performance automatically
Step-by-Step Solution
Solution:
  1. Step 1: Understand SQL standard rules

    The SQL standard mandates that every subquery in the FROM clause must have an alias to be referenced in the outer query.
  2. Step 2: Clarify misconceptions

    Aliasing does not affect performance, create permanent tables, or encrypt data.
  3. Final Answer:

    Because the SQL standard requires every derived table to have a name for reference -> Option B
  4. Quick Check:

    Alias is mandatory for derived table naming [OK]
Quick Trick: Alias every derived table to avoid syntax errors [OK]
Common Mistakes:
MISTAKES
  • Thinking alias improves performance
  • Confusing alias with permanent table creation
  • Assuming alias encrypts data

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes