-- 数据库用户名 UAGReport 表名student 已创建
use UAGReport
go
DECLARE @doc varchar(1000)
DECLARE @idoc int
SET @doc=''
6
sun
male
24
exec sp_xml_preparedocument @idoc output,@doc
select * from openxml(@idoc,'/ROOT/student',2)
with(id int,name varchar(40),sex varchar(20), age int)
insert student
select * from openxml(@idoc,'/ROOT/student',2)
with student
exec sp_xml_removedocument @idoc