Written By:- Isha Malhotra (Software Developer)
Email:-malhotra.isha3388@gmail.com.
Note: -if you find this article helpful then kindly leave your comment
Sorting
of Data in SQL Server
If we want to sort the data on the
particular column in that case we use order by command. We can sort data either
in ascending order or in descending order. By default order by command sorts
data in ascending order.
For
example:-
Check the data of following table:-
Figure 1
Suppose I want to sort data according to
the gender then I will use the following query:-
select * from
Enqdata order by
gender
Note:-by default it sorts data in
ascending order.
