I have a table as given below
FirstName SurName
Himaja V
Himaja K
mahendar Faye
Karthik Null
Varun M
Now I want to sort this table so that the required output would be alphabetical order from A to Z same in the Surname also.
Can any one help me regarding this ?
select * from table order by FirstName, SurName;You can add more than one column to the order clause. If the FirstName values are the same, then the rows are ordered by SurName.