Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Data type
Thanks...
"Daniel Morgan" <dmorgan_at_exesolutions.com> wrote in message
news:3D8A41C9.945D2E59_at_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 - 20:04:10 CDT