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



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.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