Bird
0
0

Which of the following is the correct way to create an index on the column email in PostgreSQL?

easy📝 Syntax Q12 of 15
PostgreSQL - Performance Tuning
Which of the following is the correct way to create an index on the column email in PostgreSQL?
ACREATE INDEX idx_email ON users (email);
BMAKE INDEX idx_email ON users (email);
CCREATE INDEX ON users email;
DINDEX CREATE idx_email users (email);
Step-by-Step Solution
Solution:
  1. Step 1: Recall the syntax for creating an index

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

    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:

    CREATE INDEX syntax = CREATE INDEX idx_email ON users (email); [OK]
Quick Trick: Use 'CREATE INDEX index_name ON table (column);' [OK]
Common Mistakes:
  • Using wrong keywords like MAKE or INDEX CREATE
  • Missing parentheses around column name
  • Incorrect order of keywords

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PostgreSQL Quizzes