Machine-translated by Google. Questions are authored in English.
Top

Discussion

The SQL WHERE clause:

  • A.limits the column data that are returned.
  • B.limits the row data are returned.
  • C.Both A and B are correct.
  • D.Neither A nor B are correct.

Answer: B

Correct answer: limits the row data are returned.

WHERE is a filter on rows: it tests each candidate row against a condition and keeps those for which the condition is true.

Which columns come back is decided in the SELECT list instead. The distinction is worth holding onto because the two operations are separate in relational terms - selection chooses rows, projection chooses columns - and SQL expresses them in different clauses. Since WHERE does only the first, the option claiming both is wrong.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.