!= or <>

Started by Martín Marquésalmost 25 years ago4 messagesgeneral
Jump to latest
#1Martín Marqués
martin@bugs.unl.edu.ar

I know this has been posted, put I cant find it with the search feature of
the web site of Postgresql.org.
Which is the best approach to put in a check constraint
col <> something
col != something
?

Saludos... :-)

--
El mejor sistema operativo es aquel que te da de comer.
Cuida tu dieta.
-----------------------------------------------------------------
Martin Marques | mmarques@unl.edu.ar
Programador, Administrador | Centro de Telematica
Universidad Nacional
del Litoral
-----------------------------------------------------------------

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Martín Marqués (#1)
Re: != or <>

=?iso-8859-1?q?Mart=EDn=20Marqu=E9s?= <martin@bugs.unl.edu.ar> writes:

Which is the best approach to put in a check constraint
col <> something
col != something
?

There's really no difference ... although <> is the
SQL-standard-approved spelling, if that matters to you.

regards, tom lane

#3Peter Eisentraut
peter_e@gmx.net
In reply to: Martín Marqués (#1)
Re: != or <>

Mart�n Marqu�s writes:

Which is the best approach to put in a check constraint
col <> something
col != something

<> is SQL, != is, er, AT&T?

--
Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter

#4Jan Wieck
JanWieck@Yahoo.com
In reply to: Peter Eisentraut (#3)
Re: != or <>

Peter Eisentraut wrote:

Mart�n Marqu�s writes:

Which is the best approach to put in a check constraint
col <> something
col != something

<> is SQL, != is, er, AT&T?

IIRC, AT&T is a modem test command. Do modems recognize !=
too?

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck@Yahoo.com #

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com