Sorting data in a table

SORTING DATA IN A TABLE:



  • The select commands allows user to arrange data in ascending or descending order.
  • It can apply to one or more columns.
  • To arrange data in sorted order you can use order by clause with select command.
  • By default, it will arrange data in ascending order.
  • Syntax
    • select *  from   [where ] order by [ASC | DESC]
  • Example:
    • select * from student where order by city;
    • select * from student where order by city, name;

Thanks a lot for query or your valuable suggestions related to the topic.

Previous Post Next Post

Contact Form