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 -> Creating a field template in oracle

Creating a field template in oracle

From: Julian K. Black <julianb_at_bellsouth.net>
Date: Thu, 18 Oct 2001 01:42:38 -0700
Message-ID: <C0uz7.6087$K8.519395@e3500-atl1.usenetserver.com>


Hi gang, I am trying to create a user-defined boolean field type using 1 as true and 0 as false. Can anyone recommend a approach to doing this. I have thought about creating an object as follows:

CREATE OR REPLACE type t_boolean as object (
 answer integer(1) check (answer in (0,1))  );

This will not compile because of the check constraint buy you get the general idea. I have about 20 "boolean" fields in my schema and instead of repeating the same code I would just like to define a type and apply it to all of my boolean fields. Thanks in advance. Received on Thu Oct 18 2001 - 03:42:38 CDT

Original text of this message

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