| ame], NULL AS [Product!2!ProductID!IDREF], NULL AS [Product!2!ProductName] FROM Categories WHERE CategoryID < 3 UNION ALL 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!ID] ,[Product!2!ProductID!IDREF] FOR XML EXPLICIT,XMLDATA 返回结果: <Schema name="Schema2" xmlns="urn:schemas-microsoft-com:xml-data" xmlns:dt="urn:schemas-microsoft-com:datatypes"> <ElementType name="Category" content="mixed" model="open"> <AttributeType name="ID" dt:type="id"/> <AttributeType name="Name" dt:type="string"/> <attribute type="ID"/> <attribute type="Name"/> </ElementType> <ElementType name="Product" content="mixed" model="open"> <AttributeType name="ProductID" dt:type="idref"/> <AttributeType name="ProductName" dt:type="string"/> <attribute type="ProductID"/> <attribute type="ProductName"/> &nb << 上一页 [21] [22] [23] [24] 下一页 |