i am making a project where i have to add city,agentname,rankofagent,refrenceagentname
the problem is that who can i make a table where suppose i add member a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p
like that b is joined by a
c is joined by b
d by c, e by d and so on,
what i want here is that how can i get the result suppose i want to see that chain of p.
i want result to be printed as a,b,c,d,e,f,g,h,i,j,k,l,m,n,o
either result should be in horizontal form or vertical. with or withought comma.
kindly help me to design and implement the query.
i am doing this in SQL