Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Procedures in object data type
This is a multi-part message in MIME format.
------=_NextPart_000_0008_01C048EE.49293EB0 Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
If I have a object table with object that have procedures, for instance
CREATE TYPE t_A AS OBJECT (
R NUMBER,
S NUMBER,
MEMBER PROCEDURE Plus(X IN NUMBER));
CREATE OR REPLACE TYPE BODY t_A AS
MEMBER PROCEDURE Plus (X IN NUMBER) IS
BEGIN
R := R + X;
END Plus;
END;
CREATE TABLE Tab_A OF t_A (
R PRIMARY KEY)
OBJECT IDENTIFIER IS PRIMARY KEY;
Which the best form to use the member procedure?
Santiago
------=_NextPart_000_0008_01C048EE.49293EB0 Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4134.600" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D700014317-07112000><FONT face=3DArial size=3D2>If I =
have a object=20
table with object that have procedures, for instance</FONT></SPAN></DIV>
<DIV><SPAN class=3D700014317-07112000><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D700014317-07112000><FONT face=3DArial size=3D2>CREATE =
TYPE t_A AS=20
OBJECT (</FONT></SPAN></DIV>
<DIV><SPAN class=3D700014317-07112000> <FONT =
face=3DArial=20
size=3D2>R NUMBER,</FONT></SPAN></DIV>
<DIV><SPAN class=3D700014317-07112000> <FONT =
face=3DArial=20
size=3D2>S NUMBER,</FONT></SPAN></DIV>
<DIV><SPAN class=3D700014317-07112000> <FONT =
face=3DArial=20
size=3D2>MEMBER PROCEDURE Plus(X IN NUMBER));</FONT></SPAN></DIV>
<DIV><SPAN class=3D700014317-07112000><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D700014317-07112000><FONT face=3DArial size=3D2>CREATE =
OR REPLACE=20
TYPE BODY t_A AS</FONT></SPAN></DIV>
<DIV><SPAN class=3D700014317-07112000> <FONT =
face=3DArial=20
size=3D2>MEMBER PROCEDURE Plus (X IN NUMBER) IS</FONT></SPAN></DIV>
<DIV><SPAN class=3D700014317-07112000> <FONT =
face=3DArial=20
size=3D2>BEGIN</FONT></SPAN></DIV>
<DIV><SPAN =
class=3D700014317-07112000> =20
<FONT face=3DArial size=3D2>R :=3D R + X;</FONT></SPAN></DIV>
<DIV><SPAN class=3D700014317-07112000> <FONT =
face=3DArial=20
size=3D2>END Plus;</FONT></SPAN></DIV>
<DIV><SPAN class=3D700014317-07112000><FONT face=3DArial=20
size=3D2>END;</FONT></SPAN></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><SPAN class=3D700014317-07112000><FONT face=3DArial size=3D2>CREATE =
TABLE Tab_A=20
OF t_A (</FONT></SPAN></DIV>
<DIV><SPAN class=3D700014317-07112000> <FONT =
face=3DArial=20
size=3D2>R PRIMARY KEY)</FONT></SPAN></DIV>
<DIV><SPAN class=3D700014317-07112000><FONT face=3DArial size=3D2>OBJECT =
IDENTIFIER IS=20
PRIMARY KEY;</FONT></SPAN></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><SPAN lang=3DEN-US=20
style=3D"FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; =
mso-bidi-font-size: 10.0pt; mso-fareast-font-family: 'Times New Roman'; =
mso-ansi-language: EN-US; mso-fareast-language: ES; mso-bidi-language: =
AR-SA"><FONT=20
face=3DArial><FONT size=3D2>Which the best form to use the<SPAN=20
class=3D700014317-07112000> member </SPAN>procedure<SPAN=20
class=3D700014317-07112000>?</SPAN></FONT></FONT></SPAN></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Santiago </FONT></DIV>
Received on Tue Nov 07 2000 - 12:09:43 CST
![]() |
![]() |