示例一: 需求:将'1,2,3,4,5,6,7,8,9,10'转成:'1','2','3','4','5','6','7','8','9','10' ),) set @s='1,2,3,4,5,6,7,8,9,10' set @sql=''''+REPLACE(@s,',',''',''')+'''' --set @sql='select col='''+ replace(@s,',',''' union all select ''')+'''' PRINT @sql 显示结果: '1','2'