查询语句:
SELECT 1 AS Tag,NULL AS Parent,
CategoryID AS [Category!1!ID],
CategoryName AS [Category!1!Name],
NULL AS [Product!2!ProductID!element],
NULL AS [Product!2!ProductName!element]
FROM Categories WHERE CategoryID < 3
UNION ALL
SELECT 2 AS Tag,1 AS Parent,
Categories.CategoryID AS [Category!1!ID],
Categories.CategoryName AS [Category!1!Name],--这里可以使用NULL代替
ProductID AS [Product!2!ProductID!element],
文章来源于领测软件测试网 https://www.ltesting.net/