Saturday, September 28, 2013

how to generate ordered sequence for n number of n number of child

select <>

from yourtable order by isnull(parentid, id), id;


No comments:

Post a Comment