Steve Katen wrote:
> Ruben,
>
> If you leave it as NOT NULL it should default to NO. "If an ENUM is
> declared NOT NULL, the default value is the first element of the list
> of allowed values."
>
> SIDE QUESTION:
> Are you doing something like: select * from table where enum_colum="NO"
>
> If you are running that type of query it won't work because enum does
> not store the values you put in. it stores an index.
It most certainly will work.
>
>
> if you create the table with enum("NO","YES") then you should be able
> to do a select * from table where enum_column=1
>
> that should return everything with a NO value.
>
> Go read the documentation and see what it has to say:
> http://www.mysql.com/documentation/mysql/full/manual_toc.html#ENUM
>
> katen
>
> At 12:24 PM 4/12/2002 -0400, Ruben I Safir wrote:
>
>> sql
>>
>> > > 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.
>> > >
>> > I need it to default to 'NO' not NULL
>
>
>
>
> ---------------------------------------------------------------------
> 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