Which of the following statement is correct to display all the cities with the condition, temperature, and humidity whose humidity is in the range of 60 to 75 from the 'whether' table?

Category: SQLWhich of the following statement is correct to display all the cities with the condition, temperature, and humidity whose humidity is in the range of 60 to 75 from the 'whether' table?
Editor">Editor Staff asked 2 years ago

Which of the following statement is correct to display all the cities with the condition, temperature, and humidity whose humidity is in the range of 60 to 75 from the ‘whether’ table?

  1. SELECT * FROM weather WHERE humidity IN (60 to 75)
  2. SELECT * FROM weather WHERE humidity BETWEEN 60 AND 75
  3. SELECT * FROM weather WHERE humidity NOT IN (60 AND 75)
  4. SELECT * FROM weather WHERE humidity NOT BETWEEN 60 AND 75
1 Answers
Editor">Editor Staff answered 2 years ago

Answer: 
2. SELECT * FROM weather WHERE humidity BETWEEN 60 AND 75
Explanation:
The BETWEEN is a conditional operator that is used to retrieve values from an expression within a range. It can be used with the SELECT, INSERT, UPDATE and DELETE statement.
The IN is a conditional operator used to reduce the use of multiple OR conditions in the SELECT, INSERT, UPDATE and DELETE statement.
Hence the option B is the correct choice.