What is the purpose of Django's distinct() method?
Correct answer
A. It removes duplicate rows from query results
19 views
A. It removes duplicate rows from query results
19 views
distinct() removes duplicate rows from query results by adding SELECT DISTINCT to the SQL.
It is most useful after joins across relationships, which can otherwise return the same object several times.
Keep preparing with more Computer Science MCQs on MCQsExam.com.
Not sure why the answer is A? Ask here and get an explanation.