Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Equivalent of User-Defined Datatypes in Oracle?
Oracle8 provides full support for types via the objects option :
For example :
CREATE OR REPLACE TYPE RoomObj AS OBJECT (
ID NUMBER(5), building VARCHAR2(15),
DBMS_OUTPUT.PUT('Room ID:' || ID || ' is located in '); DBMS_OUTPUT.PUT(building || ', room ' || room_number); DBMS_OUTPUT.PUT(', and has ' || number_seats || ' seats.'); DBMS_OUTPUT.NEW_LINE;
CREATE TABLE rooms OF RoomObj;
Regards
David Russell
Scott C. wrote in message <6psndc$9cf$1_at_camel0.mindspring.com>...
>I'm looking to port several apps from MS/SQL Server to Oracle 8 and one of
>the roadblocks (and I expect many) is there doesn't seem to be the
>equivalent of user-defined datatypes in Oracle 8.x.
>
>I've looked at "subtypes" but it doesn't seem like I can use them in table
>creation which is the most critical part for my apps as every table
>definition in the existing MS/SQL Server environment uses them.
>
>I find it hard to believe that Oracle in 1998 wouldn't have a feature that
>seems so basic.
>
>
Received on Sat Aug 01 1998 - 19:45:24 CDT