What is Data Sorting?

Data sorting or simply sorting is the process of organizing list of records in database in logical order on the basis of key field of the records.
  • For example: If the records of students contains marks of different subjects and user just want to know the list according to the score in mathematics, then user uses the sort command.
  • Sorted data is easy to handle than unsorted data. It helps to locate required record quickly.
Sorting are of two types:
  • Sort ascending
  • Sort descending