Re: [INTERFACES] selectecting not null varchars. - Mailing list pgsql-interfaces

From Ed Loehr
Subject Re: [INTERFACES] selectecting not null varchars.
Date
Msg-id 38B5C3BD.64839CD0@austin.rr.com
Whole thread Raw
In response to selectecting not null varchars.  (Joseph Shraibman <jks@p1.selectacast.net>)
List pgsql-interfaces
Mike Mascari wrote:
> 
> Someone wrote:
> >
> > Joseph Shraibman wrote:
> > >
> > >  select * from directory where h != null  ;
> > > ... gets you this:
> > > ERROR:  parser: parse error at or near ";"
> >
> > Postgresql's SQL "not equal" operator is "<>"...Try this:
> >
> >         select * from directory where h <> null;
> 
> Does that work?

No, it does not work.  Whoever said that must've not had their
afternoon nap.

> I remember when the equality with NULL was added
> because of non-compliant queries being generated from Access. I
> didn't know inequality was implemented as well. Formal SQL is:
> 
> SELECT * FROM directory WHERE h IS NOT NULL;

You are right.  That guy was asleep.  [Mea culpa...]

Cheers,
Ed Loehr


pgsql-interfaces by date:

Previous
From: Tom Lane
Date:
Subject: Re: [INTERFACES] selectecting not null varchars.
Next
From: Tim Kane
Date:
Subject: arrays of varchar and "