I have table in that there are relation between Parent and Child, in this my ParentID and SID data type is uniqueidentifier, now I want to sort the data based on the it’s ParentID. the value in my table is like below:

How can I sort the data of this table based on the ParentID.
Any one please help me to archive this.
You can just use an
ORDER BYin yourSELECTstatement.It might look like the data isn’t sorted but it is, it just sorts different since it is a uniqueidentifier. Here is some info I found on sorting by GUIDs.
How are GUIDs sorted on SQL server?