详细链接:https://shop499704308.taobao.com/?spm=a1z38n.10677092.card.11.594c1debsAGeak--方法0:动态SQL法 declare @s varchar(),@sql varchar() set @s='1,2,3,4,5,6,7,8,9,10' set @sql='select col='''+ replace(@s,',',''' union all select ''')+'''' PRINT @sql exec (@