SQL Order By Asc

SQL Order By Asc is used sort data in Ascending Order.
By default record is in ascending order.

Syntax


SELECT * FROM table_name
WHERE condition ORDER BY column_name ASC|DESC;



StudentID StudentName StudentCity
1 Rahul Chandigarh
2 Karan Mohali
3 Neha Delhi
4 Manpreet Chandigarh
5 Ajay Delhi



SELECT * FROM Student
WHERE 1 ORDER BY StudentName ASC



StudentID StudentName StudentCity
5 Ajay Delhi
4 Manpreet Chandigarh
2 Karan Mohali
3 Neha Delhi
1 Rahul Chandigarh

Back To Top