更新时间:2022-12-09 22:47:20
我认为你可以用一个查询:
I think that you can do it with one query:
select s.id, count(*)
from spatial_data s, table(s.geometry.sdo_ordinates)
group by s.id
或者你可以写一个plsql简单函数,返回SDO_ORDINATE_ARRAY VARRAY :
or you can write a plsql simple function that returns the count attribute of the SDO_ORDINATE_ARRAY VARRAY:
create or replace function get_count(ar in SDO_ORDINATE_ARRAY) return number is
begin
return ar.count;
end get_count;
甚至更好将一个成员函数添加到返回count属性的SDO_GEOMETRY TYPE
or even nicer add a member function to SDO_GEOMETRY TYPE which return the count attribute