Past ExamsRwanda ICT preparation

Topics / Database

The HireDate column is indexed, but WHERE YEAR(HireDate) = 2024 is slow. Which rewrite lets the index be used?

La colonne HireDate est indexée, mais WHERE YEAR(HireDate) = 2024 est lent. Quelle réécriture permet d'utiliser l'index ?

Answers
AWHERE HireDate >= '2024-01-01' AND HireDate < '2025-01-01'WHERE HireDate >= '2024-01-01' AND HireDate < '2025-01-01'
BWHERE YEAR(HireDate) = '2024' written as text, with ORDER BY YEAR(HireDate) added at the endWHERE YEAR(HireDate) = '2024' écrit en texte, avec ORDER BY YEAR(HireDate) ajouté à la fin
CWHERE HireDate LIKE '%2024%'WHERE HireDate LIKE '%2024%'
DDrop the indexSupprimer l'index
The answer and explanation are in the full bank.

This question is one of 2,831 in the paid banks. Each comes with the correct answer and the reasoning behind it, not just a mark.

Unlock for 5,000 RWF

MIFOTRA exam practicealigned to Practice set: Database Management·3 marks·Hard

More Database questions