SQL Server版:
Oracle:
SYS_CONNECT_BY_PATH
START WITH pid IS NULL CONNECT BY NOCYCLE PRIOR NO = pid
MySQL:
group_concat
详细可参考[url]http://www.cnblogs.com/kiant71/archive/2010/04/09/1752006.html[/url]
select stuff(
(
select
','+odr.ccontact
from t_order odr
join t_order_tour tot on tot.uteamid='A52D1FB4-64B2-4C04-AD6B-05BC4959BD21' and odr.uid=tot.uorderid
for xml path('')
)
,1,1,'')
Oracle:
SYS_CONNECT_BY_PATH
START WITH pid IS NULL CONNECT BY NOCYCLE PRIOR NO = pid
MySQL:
group_concat
详细可参考[url]http://www.cnblogs.com/kiant71/archive/2010/04/09/1752006.html[/url]

本文详细解析了SQLServer中selectstuff函数的用法,并提供了与Oracle和MySQL的对应实现方式。
8802

被折叠的 条评论
为什么被折叠?



