问题
What's mean of the "T(C)"?
DECLARE @xml XML ='<root><id>1</id><id>2</id><id>3</id><id>4</id></root>'
SELECT
T.C.value('(text())[1]','varchar(20)')
FROM @xml.nodes('/root/id') AS T(C)
Note:can you give me a perfessional url,I want to see carefully.
thx very much.
回答1:
From MSDN Nodes()
Function syntax is
nodes (XQuery) as Table(Column)
Table(Column) Is the table name and the column name for the resulting rowset.
来源:https://stackoverflow.com/questions/27919534/whats-mean-of-the-tc-when-i-query-xml-in-sql-server-2008