How can you sort the results from an sql statement?

1 answer

Answer

1130534

2026-07-12 00:45

+ Follow

You can sort the results of a query by using the order by clause.

Ex: Select * from tbl_employee order by emp_num

The above query would sort the results by the employee number and display them. The default sort is ascending order.

Ex: Select * from tbl_employee order by emp_num desc

The above query would sort the results by descending order of employee number and display them.

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.