You have to select persons whose age is between twenty-five and forty from a database named HumanResource. Which of the following criteria will you use in the query to accomplish the task?
BETWEEN 25 AND 40
Correct:
BETWEEN 25 AND 40
Explanation:
Answer option D is correct.
In order to accomplish the task, you will use the following criteria:
BETWEEN 25 AND 40
The BETWEEN clause is used to search data as per the given range specified in the clause. It is mandatory to use the AND logical operator with the BETWEEN clause.
Answer options A, B, and C are incorrect. The BETWEEN clause uses AND operator to search the data in a given range. The &, -, TO operator are not used with the BETWEEN operator.