PL/SQL function 使用求教?# Database - 数据库
f*e
1 楼
我要计算两点间距离,需要用到built-in function POWER and SQRT,
下面的code 该如何调用这些函数修改?
create or replace type Point as object(
X float,
Y float
);
/
create or replace type Line as object(
SP point,
EP point,
member function length return FLOAT, /* get line length */
pragma restrict_references(length,WNDS,WNPS)
);
/
create or replace type body Line as
member function length return FLOAT is
dx float; -- x direction distance square
dy float; -- y direction distance squa
下面的code 该如何调用这些函数修改?
create or replace type Point as object(
X float,
Y float
);
/
create or replace type Line as object(
SP point,
EP point,
member function length return FLOAT, /* get line length */
pragma restrict_references(length,WNDS,WNPS)
);
/
create or replace type body Line as
member function length return FLOAT is
dx float; -- x direction distance square
dy float; -- y direction distance squa