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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Data type

Re: Data type

From: Daniel Morgan <dmorgan_at_exesolutions.com>
Date: Thu, 19 Sep 2002 21:29:49 GMT
Message-ID: <3D8A41C9.945D2E59@exesolutions.com>


bigKED wrote:

> I've installed Enterprise 9i on Windows 2000. Is there a data type for yes
> or no? For e.g.. Done Y/N,
>
> Thanks...
>
> Ked
>
> P.S. Yes, I"m new.

CHAR(1) or VARCHAR2(1).

Your construct is likely going to be something like:

CREATE TABLE xyz (
  yes_no_field VARCHAR2(1) DEFAULT N);

ALTER TABLE xyz
ADD CONSTRAINT cc_xyz_yes_no_field
CHECK (yes_no_field IN ('Y', 'N'));

Daniel Morgan Received on Thu Sep 19 2002 - 16:29:49 CDT

Original text of this message

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