我创建了一个表
Movie ( title varchar2(40), review XMLTYPE)
并且评论有:`
<review>
<reviewer>...</reviewer>
<title> ....</title>
<rating>.....</rating> </Review> </reviewer>
当我尝试访问时:
SELECT X.reviewername FROM movie m, XMLTABLE ('for $d in /reviews/review
return $d'
PASSING OBJECT_VALUE
columns
reviewername VARCHAR2(50) PATH 'reviewer') AS X
我在 OBJECT_VALUE 处收到错误消息。我哪里错了?
编辑:我将查询更改为
SELECT m.title,
warehouse2.*
FROM movie M,
XMLTABLE('/REVIEW'
PASSING m.reviews
COLUMNS
"Rail" varchar2(60) PATH '//RATING')
warehouse2;
但是没有行被选中。有什么建议么?