What's mean of the “T(C)”? when I query xml in sql server 2008

£可爱£侵袭症+ 提交于 2021-01-29 01:36:27

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!