WHERE categoryID > 6 FOR XML EXPLICIT 返回结果: <Category ID="7" Name="Produce"> <Description>Dried fruit and bean curd</Description> </Category> <Category ID="8" Name="Seafood"> <Description>Seaweed and fish</Description> 查询语句: SELECT 1 AS Tag,NULL AS Parent, CategoryID AS [Category!1!ID], CategoryName [Category!1], Description [Category!1!Description!element] FROM Categories WHERE categoryID > 6 FOR XML EXPLICIT 返回结果: <Category ID="7"> Produce <Description>Dried fruit and bean curd</Description> </Category> <Category ID="8"> Seafood <Description>Seaweed and fish</Description> </Category> xml指令同element指令差不多,只是element指令会将一些xml下面的符号进行编码,如>被编码成>5,而xml指令不会。 2> 使用hide << 上一页 [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] ... 下一页 >> |