Use the 'Order By' clause to sort the data in ascending or descending order.
SQL> select first_name,last_name,salary from employees where salary between 1000 and 3000 order by salary;
would display the output in increasing order of salary.
SQL> select first_name,last_name,salary from employees where salary between 1000 and 3000 order by salary desc;
Have a question or comment? Post it below!

0 Comments:
Post a Comment