i am making a select and i want to select all the worws that the col name date is empty! (nothing written there!!) the dat col is of type : int(11) unsigned and when i try in the select where date=null OR where date=0 or WHERE date='' none of this helps! thanks in advance peleg
where date=0 should work. Do you have a default value set on the column? have you tried where date<1 ? HTH Bubble
beacuse idont have default=0!
Do a desc tablename; and you'll find that if no default value for int is set then it is automatically set to zero. try select date from table order by date desc; all the smallest values of date will be at the bottom of the list so you'll esily be able to see if there are any zeros at all. HTH Bubble
and yes its at the bottom! but : when i do :
select * from table where date=''
or
select * from table where date=0
select * from table where date=null
all of this returns me that there are no records!
When you say "and yes it's at the bottom" do you mean that there is definately a record with zero (0) in the date column? Have you tried doing date<1 yet? HTH Bubble
this is the solution :
select * from table where date is NULL