Bird
0
0

Which SQL command correctly displays the execution plan for the query SELECT * FROM employees; in MySQL?

easy📝 Syntax Q3 of 15
SQL - Indexes and Query Performance
Which SQL command correctly displays the execution plan for the query SELECT * FROM employees; in MySQL?
APLAN SELECT * FROM employees;
BSHOW PLAN FOR SELECT * FROM employees;
CEXPLAIN SELECT * FROM employees;
DDESCRIBE EXECUTION SELECT * FROM employees;
Step-by-Step Solution
Solution:
  1. Step 1: Recall MySQL syntax

    In MySQL, the EXPLAIN keyword before a SELECT statement shows the execution plan.
  2. Step 2: Evaluate options

    Only EXPLAIN SELECT * FROM employees; uses the correct syntax; others are invalid or unsupported commands.
  3. Final Answer:

    EXPLAIN SELECT * FROM employees; -> Option C
  4. Quick Check:

    MySQL uses EXPLAIN before SELECT [OK]
Quick Trick: Use EXPLAIN before SELECT in MySQL [OK]
Common Mistakes:
  • Using SHOW PLAN which is not valid in MySQL
  • Using PLAN keyword alone
  • Confusing DESCRIBE with EXPLAIN

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes