Bird
0
0

Which SQL statement correctly creates an index on the column email in the table users?

easy📝 Syntax Q12 of 15
SQL - Indexes and Query Performance
Which SQL statement correctly creates an index on the column email in the table users?
ACREATE INDEX idx_email ON users(email);
BCREATE users INDEX ON email;
CINDEX CREATE ON users(email);
DCREATE INDEX users_email email;
Step-by-Step Solution
Solution:
  1. Step 1: Recall correct CREATE INDEX syntax

    The correct syntax is: CREATE INDEX index_name ON table_name(column_name);
  2. Step 2: Match the options to syntax

    CREATE INDEX idx_email ON users(email); matches the correct syntax exactly.
  3. Final Answer:

    CREATE INDEX idx_email ON users(email); -> Option A
  4. Quick Check:

    Correct CREATE INDEX syntax = CREATE INDEX idx_email ON users(email); [OK]
Quick Trick: CREATE INDEX index_name ON table(column) is correct syntax [OK]
Common Mistakes:
  • Swapping table and column names
  • Omitting ON keyword
  • Wrong order of keywords

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes