文件名称:oracle xml函数使用例子1
文件大小:754B
文件格式:SQL
更新时间:2013-02-21 05:36:10
oracle xml 函数
oracle数据库中XML字段的操作,--通过查询节点id返回以父节点为根节点的整棵节点树 SELECT extract(value(t),'/chapter').getstringval() ChapterName FROM t_content_metadata,TABLE( xmlsequence ( extract(XML_FILE, '/book/column/chapter')) ) t WHERE METADATA_ID=100000311009 and extractValue(value(t),'/chapter/id') = '10001' SELECT extract(value(t),'/column').getstringval() ChapterName FROM t_content_metadata,TABLE( xmlsequence ( extract(XML_FILE, '/book/column')) ) t WHERE METADATA_ID=100000311009 and extractValue(value(t),'/column/id') = '1234567' SELECT extract(value(t),'/book').getstringval() ChapterName FROM t_content_metadata,TABLE( xmlsequence ( extract(XML_FILE, '/book')) ) t WHERE METADATA_ID=100000311009 and extractValue(value(t),'/book/id') = '20001'