フリー問題

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

問題文

A WHERE clause reads job_id = 'SA_REP' OR job_id = 'AD_VP' AND salary > 15000 and the writer expected both job codes to be filtered by the salary. Which rows does the clause actually keep?

選択肢

  1. It keeps the sales representatives above 15000, together with every vice president regardless of salary, because disjunction binds more tightly than conjunction.
  2. It keeps the rows of both job codes that are above 15000, because the database reads the three conditions from left to right, applying each one in turn.
  3. It keeps the rows of both job codes, and it ignores the salary condition, because a condition that follows a disjunction is read as a comment.
  4. It keeps every sales representative regardless of salary, together with the vice presidents above 15000, because conjunction is evaluated before disjunction.

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

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