2

以下の SQL コードで、T(C) は何を意味しますか? Tとは何ですか、Cとは何ですか?

declare @employeeData xml --this would be your XML input parameter
set @employeeData = '<employeeData>
<employee LastName="Smith" FirstName="Randolph" EmployeeID="1234567"/>
</employeeData>'

declare @xmlTable table (LastName nvarchar(255), FirstName nvarchar(255), EmployeeID int)

insert into @xmlTable (LastName, FirstName, EmployeeID)
select 
C.value('@LastName','nvarchar(255)') as LastName,
C.value('@FirstName','nvarchar(255)') as FirstName,
C.value('@EmployeeID','int') as EmployeeID
from
@employeeData.nodes('/employeeData/employee') T(C)

select * from @xmlTable
4

1 に答える 1

2

MSDN を確認してください: http://msdn.microsoft.com/en-us/library/ms188282.aspx

T - 表 C - 列

于 2013-05-10T18:14:43.710 に答える