Skip site navigation (1) Skip section navigation (2)

Re: [INTERFACES] selectecting not null varchars.

From: Ed Loehr <eloehr(at)austin(dot)rr(dot)com>
To: Mike Mascari <mascarm(at)mascari(dot)com>
Cc: Joseph Shraibman <jks(at)p1(dot)selectacast(dot)net>, "pgsql-interfaces(at)postgreSQL(dot)org" <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: [INTERFACES] selectecting not null varchars.
Date: 2000-02-24 23:50:21
Message-ID: 38B5C3BD.64839CD0@austin.rr.com (view raw or flat)
Thread:
Lists: 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

In response to

pgsql-interfaces by date

Next:From: Tim KaneDate: 2000-02-24 23:54:18
Subject: arrays of varchar and "
Previous:From: Tom LaneDate: 2000-02-24 22:23:46
Subject: Re: [INTERFACES] selectecting not null varchars.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group