Page 1 of 1

NULL value not inserted

Posted: Mon Jun 21, 2004 4:04 am
by bugthefixer
my code is like this

Code: Select all

update train
set dep_time='NULL' where st_id=2;
datatype of dep_time is 'time'.
this query doesnt insert NULL rather inserts '00:00:00'
anybody can tell me how to insert NULL value

Posted: Mon Jun 21, 2004 4:06 am
by JayBird
If you put single quotes around NULL, it will insert the string NULL.

You need to do this

Code: Select all

update train 
set dep_time=NULL where st_id=2;
Mark