Examveda
Examveda

Find the name of cities with all entries whose temperature is in the range of 71 and 89

A. SELECT * FROM weather WHERE temperature NOT IN (71 to 89);

B. SELECT * FROM weather WHERE temperature NOT IN (71 and 89);

C. SELECT * FROM weather WHERE temperature NOT BETWEEN 71 to 89;

D. SELECT * FROM weather WHERE temperature BETWEEN 71 AND 89;

Answer: Option D

Solution(By Examveda Team)

To retrieve the names of cities with entries where the temperature falls within the range of 71 to 89, you should use the SQL query SELECT * FROM weather WHERE temperature BETWEEN 71 AND 89; (Option D). This query utilizes the BETWEEN operator to specify the temperature range. It selects all entries in the "weather" table where the temperature is within the specified range. Option D is the correct choice for achieving this result.

This Question Belongs to SQL >> Sql Miscellaneous

Join The Discussion

Related Questions on Sql Miscellaneous