SELECT Categories.CategoryID,
ProductID,
ProductName
FROM Categories
JOIN Products ON Categories.CategoryID = Products.CategoryID and ProductID <4
WHERE Categories.CategoryID <3 FOR XML AUTO, ELEMENTS
返回结果:
1
1
Chai
2
Chang
文章来源于领测软件测试网 https://www.ltesting.net/