Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6374281
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:28:06+00:00 2026-05-25T01:28:06+00:00

I have table in that there are relation between Parent and Child, in this

  • 0

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:

enter image description here

How can I sort the data of this table based on the ParentID.
Any one please help me to archive this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T01:28:07+00:00Added an answer on May 25, 2026 at 1:28 am

    You can just use an ORDER BY in your SELECT statement.

    SELECT SubjectName, ParentID, SubjectID, SID
    FROM yourTable
    ORDER BY ParentID
    

    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?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a one-to-many relation between Parent and Child table. In the parent object
Hi there I have an SQL table that looks like this: CREATE TABLE IF
I have a table which keeps parent-child-relations between items. Those can be changed over
I have a table that I created within xcode so there is no nib
I have a table that contains id, created, user_id. I'm wondering if there is
Suppose I have a table called Companies that has a DepartmentID column. There's also
I have two tables. Those tables have two relation between them. Table 1 *
I have a table that has three different date columns, so I set each
I have a table that contains tasks and I want to give these an
In my table I have looked manually and found that the top three idle

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.