MySQL Forums
Forum List  »  Stored Procedures

convert the Bellow Common Table Expression to MySQL Store Procedure
Posted by: SHAHADAT ALI
Date: September 12, 2015 04:51AM

Dear Mam/Sir

please help me i m unable to convert the Bellow Common Table Expression to MySQL Store Procedure plx help...

with UserCTE as
(
select
ps.MemberID, ps.invitedTO, 1 as steps
from
TableName ps
where
ps.MemberID= 1;
Union all
select
pr.MemberID, pr.InvitedTO, u.step+1
from
UserCTE u
inner join
TableName pr on pr.MemberID=u.InvitedTO
)
selec *
from UserCTE
where steps<=6order by steps

Options: ReplyQuote


Subject
Views
Written By
Posted
convert the Bellow Common Table Expression to MySQL Store Procedure
2759
September 12, 2015 04:51AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.