FROM Categories MyTable
WHERE CategoryID < 3 FOR XML AUTO
返回结果:
2.连接查询
以两个表为例,
查询语句:
SELECT Categories.CategoryID,
Categories.CategoryName,
ProductID,
ProductName
FROM Categories
JOIN Products ON Categories.CategoryID = Products.CategoryID AND ProductID <5
文章来源于领测软件测试网 https://www.ltesting.net/