1. Home
  2. Computer Science MCQs
  3. Django
  4. Which of the following is NOT true about Django's distinct…

Added 28 Apr 2024

Which of the following is NOT true about Django's distinct method?

  1. It removes duplicate rows from query results
  2. It can be used with the annotate method
  3. It is only available for PostgreSQL databases Correct answer
  4. It can improve query performance

Correct answer

C. It is only available for PostgreSQL databases

18 views

MCQSEXAM

Explanation

The false statement is that distinct() is only available for PostgreSQL. Plain distinct() works on every backend.

What is PostgreSQL-only is passing field names — distinct("field") — which produces DISTINCT ON. That difference is the point of the question.

Practise more Computer Science MCQs with answers and explanations on MCQsExam.com.

Doubts & discussion

Not sure why the answer is C? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Django MCQs

Practise all Django MCQs

Similar MCQs