Select with Order by Clause
select * from <table_name> order by columnname [asc|desc];
I want to see highest salary employee on the top:
select * from employee order by salary desc;
I want to see lowest salary employee on the first one:
select * from employee order by salary;
Note: asc order is default one you not need to specify it.
I want to sort department wise highest salary on top.
select * from employees order by dept_no asc, salary desc ;