[EMAIL PROTECTED] wrote:
> 
> Stefan,
> 
> When you insert a row in a table and you do not specify a value
> for a field, mySQL (and any other DBMNS?) will do the following:
> 
> 1. If field accepts null: it will set the value of that field
> to null
> 
> 2. If field DOES NOT accept null - no default value set: it will
> set the field's value as per "primitive" data type of field. If CHAR()
> it will set it to '', if date/datetime to 0000-00-00, if numeric
> to 0. And so on.  And this is why you get the '' in your field
> when you do your insert.
> 
> 2. If field DOES NOT accept null - default value set:
> it set the field's value to the deafult.
> 

i found this behaviour for date/datetime values in the documentation,
but 
nothing with char/varchar.

looks like there is no way to reject rows when forgot to set iuser :-(


your explanation should be pasted to the mysqlDocu

thx

stefan

> Christopher Lambrou,
> CGL Computer Services, Inc.
> Empire State Building,
> PMB 16J Suite 3304
> New York, NY 10118
> Tel: (212) 971-9723
> Fax: (212) 564-1135
> URL: http://www.cglcomputer.com
> Email: [EMAIL PROTECTED]
> 
> On 5/03/2001 20:59:48, you said:
> >hi list,
[snip]

-- 
st3V13h

nach diktat verreist

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