可以將多條數據組成一棵XML樹
將XML樹作為varchar參數傳入
用 insert xx select xxx from openxml() 的語法插入數據
一個小例子:
declare @ssss as nvarchar(2000) ;
set @ssss = N'
' ;
declare @idHandle as int ;
EXEC sp_xml_preparedocument @idHandle OUTPUT, @ssss
insert into tbl(Name,Intro)
select * from openxml(@idHandle,N'/root/dbo.tbl')
with dbo.tbl
EXEC sp_xml_removedocument @idHandle