Multiple choice technology

Which of the following update strategy expression will do update else insert

  1. a. iif(a=1,2,1)

  2. b. iif(a=1,0,1)

  3. c. iif(a=1,1,0)

  4. d. iif(a=1,1,2)

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The update strategy expression uses IIF(condition, value_if_true, value_if_false) where the numeric codes are: 0=DD_INSERT, 1=DD_UPDATE, 2=DD_DELETE, 3=DD_REJECT. The expression iif(a=1,1,0) means: if a equals 1, return 1 (update); otherwise return 0 (insert). This implements update-else-insert logic - update when the condition is true, insert when it's false. Option A would do delete-else-insert, Option B would do insert-else-insert (always insert), and Option D would do update-else-delete.