ENUM can handle your needs.  you should be able to just change your syntax 
to: FIELD ENUM('NO','YES') NULL

under that syntax your default value will be NULL.

this is from the documentation directly: "If an ENUM is declared NULL, NULL 
is also a legal value for the column, and the default value is NULL. If an 
ENUM is declared NOT NULL, the default value is the first element of the 
list of allowed values. "

read the documentation at: 
http://www.mysql.com/documentation/mysql/full/manual_toc.html#ENUM

it has all of the information you need.

katen

At 11:34 AM 4/12/2002 -0400, Ruben I Safir wrote:

>sql
>
> >
> > Hello
> >
> > I need a ENUM to default to a value when it gets a NULL.
> >
> > Can this be done.  Right now is I set the column to
> > FIELD ENUM('NO','YES') NOT NULL
> >
> > It fails to insert when a NULL is entered.
> >
> > I want it to default to NO
> >
> >
> > Can I set it to do this?
> >
> > Ruben
> >
> > --
> > __________________________
> >
> > Brooklyn Linux Solutions
> > __________________________
> > http://www.mrbrklyn.com - Consulting
> > http://www.brooklynonline.com - For the love of Brooklyn
> > http://www.nylxs.com - Leadership Development in Free Software
> > http://www.nyfairuse.org - The foundation of Democracy
> > http://www2.mrbrklyn.com/resources - Unpublished Archive or stories and 
> articles from around the net
> > http://www2.mrbrklyn.com/mp3/dr.mp3 - Imagine my surprise when I saw you...
> > http://www2.mrbrklyn.com/downtown.html - See the New Downtown Brooklyn....
> >
> > 1-718-382-5752
> >
> >
> >
> >
>--
>__________________________
>
>Brooklyn Linux Solutions
>__________________________
>http://www.mrbrklyn.com - Consulting
>http://www.brooklynonline.com - For the love of Brooklyn
>http://www.nylxs.com - Leadership Development in Free Software
>http://www.nyfairuse.org - The foundation of Democracy
>http://www2.mrbrklyn.com/resources - Unpublished Archive or stories and 
>articles from around the net
>http://www2.mrbrklyn.com/mp3/dr.mp3 - Imagine my surprise when I saw you...
>http://www2.mrbrklyn.com/downtown.html - See the New Downtown Brooklyn....
>
>1-718-382-5752
>
>
>
>
>---------------------------------------------------------------------
>Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
>To request this thread, e-mail <[EMAIL PROTECTED]>
>To unsubscribe, e-mail <[EMAIL PROTECTED]>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to