SQLSERVER的dbo.fnSplit插入多条数据
--插入新数据 INSERT INTO table ( AdMachineImgRelactionId , AdMachineImgId , AdMachineId , IsDeleted ) SELECT NEWID() AS AdMachineImgRelactionId ,--生成新GUID '666' AS AdMachineImgId ,--666为数据 Item AS AdMachineId , 0 AS IsDeleted FROM dbo.fnSplit('1,2,3,',',');--字符串以“,”分割,形成数组对象
当然,初始的也有循环多条插入