On Thursday, September 26, 2002, at 06:30 AM, Egor Egorov wrote:

> Clayburn,
> Thursday, September 26, 2002, 3:58:13 AM, you wrote:
>
> CWJI> I create a table with a VarChar field set to not null.  When I 
> do an
> CWJI> insert into this table with no value for this field it goes 
> through
> CWJI> without a problem.  I realize MySQL inserts a empty string into 
> the
> CWJI> field.  But what a want is an error when this happens.  Is there 
> any
> CWJI> way to force this?
>
> Yes, you are right, if you try to insert NULL into NOT NULL column, ''
> or 0 will be inserted:
>        http://www.mysql.com/doc/en/Bugs.html
>
> If you don't want to use default values, configure MySQL with 
> -DDONT_USE_DEFAULT_FIELDS

Thanks for the information.  I read also that MySQL AB says you should 
check insertions and updates in your program and not MySQL.

--
Clayburn W. Juniel, III -- Effective Software Solutions
Phone: (602) 326-7707    Mobile: (602)326-7707
Email: [EMAIL PROTECTED]
http://EffectiveSoftwareSolutions.com
--


---------------------------------------------------------------------
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