rspec/rules/S107/plsql/struct-example.adoc
2023-08-10 16:54:47 +02:00

27 lines
381 B
Plaintext

[source,plsql]
----
SET SERVEROUTPUT ON
-- In geometry, Point is a logical structure to group data
CREATE TYPE point AS OBJECT(
x PLS_INTEGER,
y PLS_INTEGER,
z PLS_INTEGER);
CREATE PROCEDURE storeCube(
p1 point,
p2 point)
BEGIN
-- store the cube values
END;
/
BEGIN
storeCube(point(0, 0, 0), point(1, 1, 1))
END;
/
DROP PROCEDURE storeCube;
DROP TYPE point;
----