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

Added 28 Apr 2024

Which of the following is NOT true about Django's update() method?

  1. It updates multiple objects in the database efficiently
  2. It can only be used with integer fields Correct answer
  3. It returns the number of rows affected by the update operation
  4. It can accept keyword arguments to specify the fields and their new values

Correct answer

B. It can only be used with integer fields

18 views

MCQSEXAM

Explanation

The false statement is that update() can only be used with integer fields. It can set fields of any type.

It is true that update() changes many rows in a single query, takes keyword arguments and returns the number of rows affected. It does not call save() or trigger signals.

For more solved questions like this one, see Computer Science MCQs on MCQsExam.com.

Doubts & discussion

Not sure why the answer is B? 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