Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Seeking Equivalent of InterBase Domain
MRCarver wrote:
> Daniel,
>
> Thanks again for the attention !
>
> Can one further define the TYPE with a constraint? Something like:
>
> CREATE OR REPLACE TYPE Bool_DOM OBJECT (
> Bool_DOM VARCHAR2(1) with CONSTRAINT BoolChk ((Bool_DOM IN('Y', 'N"))
> );
One can further defined any user defined type with what are called methods and write enough code to choke a beluga.
http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements001.htm#sthref243 Search on the page for the word "methods." Under that you will find "REF Datatypes."
I doubt there is anything you can do in any other database that can't be done in Oracle. The question is really more one of whether doing so would be considered "best practice."
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Sat Jan 20 2007 - 12:17:06 CST