What is order by clause

  • ORDER BY clause helps to sort the data in either ascending order to descending order.
  • Ascending order sort query:

SELECT name,age FROM pcdsEmployee ORDER BY age ASC

  • Descending order sort query

SELECT name FROM pcdsEmployee ORDER BY age DESC