CategoryName AS [Category!1!Name],
Description AS [Category!1]
FROM Categories
WHERE categoryID > 6 FOR XML EXPLICIT
返回结果:
Dried fruit and bean curd
Seaweed and fish
当然下面的语句同上面的等效,
SELECT 1 Tag,NULL Parent,
CategoryID [Category!1!ID],
CategoryName [Category!1!Name],
Description [Category!1]
文章来源于领测软件测试网 https://www.ltesting.net/