🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Indexing: all 10 questions

Quiz: Indexing · Question 6 of 10

An index exists on (city, created). Can WHERE city = 'Pune' alone use it?

An index exists on (city, created). Can WHERE city = 'Pune' alone use it?

  1. A.Yes — city is the leftmost column of the index
  2. B.No — both columns must be in the WHERE clause
  3. C.Only if created is NULL
  4. D.Only for a clustered index
Answer & explanation

Correct answer: Yes — city is the leftmost column of the index

The leftmost prefix of a composite index can be used on its own.

Can you get the rest right without peeking?

Take the timed Quiz: Indexing quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →