pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feed!= and <> operators
3+ messages / 2 participants
[nested] [flat]
* != and <> operators
@ 2001-03-13 07:17 Patrik Kudo <kudo@partitur.se>
0 siblings, 1 reply; 3+ messages in thread
From: Patrik Kudo @ 2001-03-13 07:17 UTC (permalink / raw)
To: pgsql-sql
Hi!
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 ;-)
Regards,
Patrik Kudo
ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol
Känns det oklart? Fråga på!
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: != and <> operators
@ 2001-03-13 15:04 Tom Lane <tgl@sss.pgh.pa.us>
parent: Patrik Kudo <kudo@partitur.se>
0 siblings, 1 reply; 3+ messages in thread
From: Tom Lane @ 2001-03-13 15:04 UTC (permalink / raw)
To: Patrik Kudo <kudo@partitur.se>; +Cc: pgsql-sql
Patrik Kudo <kudo@partitur.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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: != and <> operators
@ 2001-03-13 15:45 Patrik Kudo <kudo@partitur.se>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 3+ messages in thread
From: Patrik Kudo @ 2001-03-13 15:45 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-sql
How many of the other dbms' out there have this "hardwired hack"? Is
something that's postgres-specific, or is it found in oracle and sqlserver
too?
Regards,
Patrik Kudo
ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol
Känns det oklart? Fråga på!
On Tue, 13 Mar 2001, Tom Lane wrote:
> Patrik Kudo <kudo@partitur.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
>
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2001-03-13 15:45 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-03-13 07:17 != and <> operators Patrik Kudo <kudo@partitur.se>
2001-03-13 15:04 ` Tom Lane <tgl@sss.pgh.pa.us>
2001-03-13 15:45 ` Patrik Kudo <kudo@partitur.se>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox