Write the SQLite query for display result in descending order(Display the age coloum as a ascending order)


Q.50 Write the SQLite query for display result in descending order(Display the age coloum as a ascending order) Ans:-

  • Database Name: MyCircle, Table Name: Friends
  • |ID|Name    |Age|
    | 1 |Nitin    | 21 |
    | 2 |Kaka    | 22 |
    | 3 |Ganesh| 20 |
    | 4 |Sama    | 18 |
    | 5 |Pavan    | 16 |
    | 6 |Akash    | 10 |
    | 7 |Gopi    | 08 |
    | 8 |Rushi    | 04 |
    | 9 |Didi    | 03 |
  • select * from Friends order by Age desc;
  • output
    | 2 |Kaka    | 22 |
    | 1 |Nitin    | 21 |
    | 3 |Ganesh| 20 |
    | 4 |Sama    | 18 |
    | 5 |Pavan    | 16 |
    | 6 |Akash    | 10 |
    | 7 |Gopi    | 08 |
    | 8 |Rushi    | 04 |
    | 9 |Didi    | 03 |

Kalavati Technologies Pvt Ltd