📜  SQL Server 将字符串列拆分为多行,同时重复 ID 列 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:04:50.751000             🧑  作者: Mango

代码示例1
INSERT INTO TempSubProduct (ID, SubName)
SELECT ProductID, SPL.value
FROM Production.Product  AS PP
CROSS APPLY STRING_SPLIT(PP.Name,' ') AS SPL;