Re: != and <> operators

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Patrik Kudo <kudo(at)partitur(dot)se>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: != and <> operators
Date: 2001-03-13 15:04:12
Message-ID: 19227.984495852@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Patrik Kudo <kudo(at)partitur(dot)se> writes:
> I've for a while now been using the != operator in my sql queries, but in
> almost all examples I see <> instead. Are there any good reason to use
> any instead of the other? I prefer !=, but if you convince me, I'll change to
> what you other guys are using ;-)

"<>" is the SQL-standard name, and also the internal name of all these
operators. There is a hardwired hack in the lexer to convert != to <>.
So write whichever you feel like, but <> is what you'll see in dumps and
so forth ...

regards, tom lane

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message david morgan 2001-03-13 15:04:20 Re: error joining 2 views containing GROUP BYs
Previous Message Richard Huxton 2001-03-13 13:27:57 Re: copy a record from one table to another (archive)