字符串拆分(split)与游标的使用 CREATE TABLE Plates ( ,), ) NOT NULL, [BusinessId] INT NOT NULL, ) ),),), SELECT @CodeStr = 'A|B|C|D|E' )) set @TCode='insert into #temp select CodeP='''+ replace(@CodeStr,'|',''' union all select ''')+''' ' exec (@TCode) --select…