I'm using MySQL 3.23.32 and having trouble selecting values where a
column is null. Any help is appreciated. An example is below:
I need to get the rows where the last_visit column in the users table is
NULL.
I can see that there are some with this select statement:
(last_visit is a date fiel
Jeremy Zawodny wrote:
>
> On Tue, Jun 05, 2001 at 02:18:15PM -0500, Mark Stosberg wrote:
> >
> > However, if I ask for the rows where last_visit = NULL, it says there are
> > not any! :
> > mysql> select user_id,screen_name,password,last_visit,
> >
Gerald Clark wrote:
>
> You need to read up on what NULL means.
> There is nothing that = NULL.
>
> try:
> WHERE last_visit IS NULL
I _do_ understand what NULL means. Watch this: (with Postgres):
mark=> insert into t (c2) values (NULL);
INSERT 2419008 1
mark=> select * from t where c2 = NULL;
Tonu Samuel wrote:
>
> On Tue, 5 Jun 2001, Mark Stosberg wrote:
>
> > > > second_to_last_visit from users where last_visit = NULL;
> > >
> > > What if you use "last_visit IS NULL"?
> >
> > Thanks, this works. I still think MySQL be