Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: QUESTION: can you create a new datatype and setting/getting there values

Re: QUESTION: can you create a new datatype and setting/getting there values

From: Brian Peasland <dba_at_remove_spam.peasland.com>
Date: Thu, 9 Oct 2003 20:20:53 GMT
Message-ID: <3F85C325.9EDE9BA6@remove_spam.peasland.com>


Look at Oracle's Types
(http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96594/toc.htm).

HTH,
Brian

barry wrote:
>
> Hi, in Oracle you can go
>
> create table testtable(a number,b number);
> insert into testtable values(1,0);
> insert into testtable values(33,1);
> insert into testtable values(1,16);
> select * from testtable where a=1;
>
> Question
> ***********
> Can I create my own datatype in Oracle, called for example BNO, and
> insert into and select from this new datatype using a similar syntax
> so that the syntax to use BNO is the same type of syntax to use for
> number, varchar2, etc.
>
> Like
>
> create table testtable(a number, b BNO);
> insert into testtable values (1,0);
>
> Here BNO is a 'number', but I want my object to have a default
> 'constructor' or 'setter' that accepts a number, and if none exists
> then get an error. To select from the table, I want a default 'getter'
> ... etc
>
> If you can do this type of thing can someone please post some keywords
> to search on and I will try to find the information from there?
> Thank you
> Barry

-- 
===================================================================

Brian Peasland
dba_at_remove_spam.peasland.com

Remove the "remove_spam." from the email address to email me.


"I can give it to you cheap, quick, and good. Now pick two out of
 the three"
Received on Thu Oct 09 2003 - 15:20:53 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US