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

Discussion

The keyword BETWEEN can be used in a WHERE clause to refer to a range of values.

  • A.True
  • B.False

Answer: A

Correct answer: True

BETWEEN tests membership of a range and is inclusive at both ends: WHERE age BETWEEN 18 AND 65 is equivalent to age >= 18 AND age <= 65.

The inclusivity is the detail most often overlooked, particularly with timestamps, where BETWEEN '2026-01-01' AND '2026-01-31' excludes anything recorded later on the final day. The lower bound must be written first; giving them in the wrong order returns no rows rather than an error.

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

Post your comment

Please log in or register to post a comment.