Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Creating a field template in oracle
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
![]() |
![]() |