Rem create.sql connect &1/&2 set echo on set serveroutput on rem display the distance between each point in the point_table rem and the origin. rem this is an example of calling an instance method with rem an object parameter select pt.p, pt.p.jdistance(point(0, 0)) from point_table pt; rem more examples of calling an instance method (moveby) rem note that the call to moveby would change the values of p1. declare p1 point; p2 point; begin p1 := point (3, 4); p2 := point (10, 10); dbms_output.put_line ('Before moving p1: p1 is ('|| p1.x || ', ' || p1.y || ')'); p1.moveby (p2); dbms_output.put_line ('After moving p1: p1 is (' || p1.x || ', ' || p1.y || ')'); end; / exit