Check a conceptual sample code:
. . .
select *
from CTE
order by parent_id, sequence_number
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi Team, In SQL Server stored procedure. I am working on creating a recursive CTE which will show the output of hierarchical data. One parent is having multiple child's, i need to sort all child's of a parent, a sequence number field is given for same. Can you please provide a sample code for same. Thanks, Salil
Check a conceptual sample code:
. . .
select *
from CTE
order by parent_id, sequence_number