フリー問題

Oracle Database SQL のフリー問題 9 / 20 問目

問題文

A query must show a null where the current job code equals the previous job code, and must show the current code otherwise. Which expression does that with one function call?

選択肢

  1. COALESCE(job_id, previous_job_id), which returns a null when the two arguments are equal and returns the first argument when they differ.
  2. NULLIF(job_id, previous_job_id), which returns a null when the two arguments are equal and returns the first argument when they differ.
  3. NVL(job_id, previous_job_id), which returns a null when the two arguments are equal and returns the first argument when they differ.
  4. LEAST(job_id, previous_job_id), which returns a null when the two arguments are equal and returns the first argument when they differ.

解答・解説を確認するには

正解と解説の確認、回答の記録には無料登録が必要です。登録すると演習モードでフリー問題に回答し、正誤と解説をその場で確認できます。