--方法0:动态SQL法declare @s varchar(100),@sql varchar(1000)set @s='1,2,3,4,5,6,7,8,9,10'set @sql='select col='''+ replace(@s,',',''' union all select ''')+''''PRINT @sqlexec (@sql) if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[f_sp…