CREATE TABLE #TT ( NUM INT ) ;
DECLARE @strsql AS VARCHAR(8000) SELECT @strsql = 'insert into #TT values (''' + REPLACE('1,5,8', ',', ''') insert into #TT values (''')+ ''')' ;
EXEC ( @strsql);
转载于:https://www.cnblogs.com/leakey/archive/2009/09/15/1567030.html