Re: Type Boolean

From: Kevin Owens <keowens_at_delphi.com>
Date: 1995/07/10
Message-ID: <xJDDwOP.keowens_at_delphi.com>#1/1


You can declare a NUMBER and constrain it to (0, 1) with a CHECK constraint. You can use Oracle 7.1 built-in functions to convert PL/SQL BOOLEAN to a (0,1) NUMBER. For example if X is a PL/SQL BOOLEAN then you can declare a PL/SQL function TO_BOOL and use the built-in function capability of 7.1 to do the following (correcti - change TO_BOOL to TO_NUM):
INSERT INTO TABLE VALUE (TO_NUM(X));
where the prototype for TO_NUM is
function to_num(x in boolean) return number); Received on Mon Jul 10 1995 - 00:00:00 CEST

Original text of this message