KnowledgeBoat Logo
|

Informatics Practices

Select correct SQL query from below to find the temperature in increasing order of all cities.

  1. SELECT city FROM weather ORDER BY temperature ;

  2. SELECT city, temperature FROM weather ;

  3. SELECT city, temperature FROM weather ORDER BY temperature ;

  4. SELECT city, temperature FROM weather ORDER BY city ;

SQL Queries

3 Likes

Answer

SELECT city, temperature FROM weather ORDER BY city ;

Reason — The query SELECT city, temperature FROM weather ORDER BY city ; selects the city and temperature columns from the weather table and sorts the result set by the city column in ascending order.

Answered By

2 Likes


Related Questions