SELECT 2 ,1 ,
Categories.CategoryID,
NULL,
ProductID,
ProductName
FROM Categories
JOIN Products ON Categories.CategoryID = Products.CategoryID AND ProductID <5
WHERE Categories.CategoryID < 3
ORDER BY [Category!1!ID!hide] DESC,[Product!2!ProductID!element] ASC
FOR XML EXPLICIT
返回结果:
3
文章来源于领测软件测试网 https://www.ltesting.net/