SQLServer实用教程(第三版)实验10SQLServer与xml

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

10SQLServerXML1.1SQLServerXML2XQuery3FORXML2.1XML2XML3XML4XQuery5FORXML3.1XMLEmploy.xml?xmlversion=1.0encoding=UTF-8?=000001//1966-01-23//=010008///1976-03-28///Employ,xmlXML2xmltableAuseYGGLGOcreatetabletableA(numintnotnullprimarykey,infoxmlnotnull,)OPENROWSETEmployXmlxmltableA3xmlxmlxmlXQueryxmlxmlqueryXQUERYeclare@xmldocxmlset@xmldoc='=000001//43//=000002//25////'select@xmldoc.query('////')AS2.value()XMLchardeclare@xmldocxmldeclare@numberchar(6)set@xmldoc='=000001//43//=000002//25////'select@number=@xmldoc.value('(/////@)[1]','char(6)')select@numberas3.XMLDMLdeclare@xmldocxmlset@xmldoc='=000001//46//'select@xmldocasset@xmldoc.modify('insert1991-02-10/after(//)[1]')select@xmldoc1.YGGLEmployees3forxmlrawrowuseygglgoselect*fromemployeeswhereworkyear3forxmlraw2.forxmlpathselectphonenumberas'@',employeeidas'/',nameas'/',workyearas'/'fromemployeeswhereeducation=''forxmlpath('')=83792361020010//2///=84708817102208//2///=83346722108991//4///AFORXMLPATH2000BFORXMLPATHFORXMLEXPLICIT

1 / 5
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功