2011-03-17 97 views
1

的sp_xml_preparedocument中我有兩個疑問 -相當於SP的SQL Server

  1. 會是怎樣在MySQL中相當於SP \函數名稱的SQL Server sp_xml_preparedocument
  2. 什麼是SQL Server中OPENXML的等效sp \函數名稱?

回答

1

在sp_xml_preparedocument中\ OpenXML的一個很短的介紹,我可以直接把我的XML和能用作表格。但是,在ExtractValue和UpdateXML的情況下,我必須將每個xml行插入表的單獨行,然後選擇。以下示例爲例 - 如果我想使用'<books> <book> <title>A guide to the SQL standard</title> <author> <initial>CJ</initial> <surname>Date</surname> </author> </book> <book> <title>SQL:1999</title> <author> <initial>J</initial> <surname>Melton</surname> </author> </book> </books>' 這個xml我可以直接在SQL Sql Server中使用。但在MySQL的情況下,我必須插入兩行到表中,然後使用ExtractValue函數。