I will guess that the NULL field you defined is of a numeric
type such as INT. In standard SQL the empty string '' is not
the same as the special value NULL, and this is also true in
MySQL, but not in Oracle. Probably you are inserting a ''
into the database column but MySQL correctly interprets
it as a string. The default conversion for string to
integers in MySQL is to turn the string into a 0.
This is probably what is happening.

I would suggest writing your own string function in your
application which converts instances of '' into instances
of NULL. And by the way, quoting numeric data in MySQL
as well as in PostgreSQL and Oracle is acceptable but
not required.

Bye,

Neil

On Fri, 10 May 2002, raphael k wrote:

> I created a table with a field define as NULL, however when I insert
> values NULL , Mysql puts 0 instead of nothing ,
> 
> I don't understand why I have this trouble , 
> 
>  
> 
> Thanks 
> 
> 
> 
> ---------------------------------------------------------------------
> 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