摘要:
(1)定义--表中定义CREATE TABLE [dbo].[Invoice]( [Invoice_ID] [int] NULL, [SalesDate] [date] NULL, [ItemList] [xml] NULL ) --程序中定义declare @xdoc xml;--隐式类型转换SET @xdoc =’<Customer CustomerID="VINET" ContactName="Paul Henriot"> <Order CustomerID="VINET" EmployeeID="5 阅读全文
摘要:
declare @xdoc xml; SET @xdoc =' <ROOT> <Customer CustomerID="VINET" ContactName="Paul Henriot"> <Order CustomerID="VINET" EmployeeID="5" OrderDate="1996-07-04T00:00:00"> <OrderDetail OrderID="10248" ProductID=" 阅读全文
摘要:
原始数据:(1)非元素Raw模式联合查询SELECT P.Product_Name,P.ListPrice,S.Quantity FROM Products PJOIN Sales SON S.Product_ID=P.Product_IDFOR XML RAW显示结果<row Product_Name="Dell笔记本" ListPrice="3500.00" Quantity="100" /><row Product_Name="Apple笔记本" ListPrice="5000.0 阅读全文