我有一个XMLType查询,如下所示:
SELECT
c.CustId,
XMLELEMENT(NAME "customer",
XMLATTRIBUTES(c.CustId AS "id"),
XMLELEMENT(NAME "name",c.Name),
XMLELEMENT(NAME "city",c.City),
XMLELEMENT(NAME "projects",
(SELECT XMLAGG(XMLELEMENT(NAME "project",
XMLATTRIBUTES(p.ProjId AS "id"),
XMLELEMENT(NAME "name",p.Name)))
FROM Projects p
WHERE p.CustId=c.CustId))) AS "customer-projects"
FROM Customers c
我想使用JDBC ResultSet获取数据。 我试过了
ResultSet result.getString("customer-projects");
但是这给了我无效。
请帮忙。