1

Possible Duplicate:
Should I use != or <> for not equal in TSQL?

I see a number of questions using != to express the not equal operator in SQL.

Working mostly with SQL-Server and Oracle I usually prefer <> .

Are there DBMS which do not support <> ?

Edit:

SQL-Server even supports these 2-character operators with an embedded blank in between. I think that is from old Sybase days. I think no other DBMS followed them in this respect. And when you have to migrate your query to another DBMS it just becomes an error. Better don't use it.

Community
  • 1
  • 1
bernd_k
  • 11,558
  • 7
  • 45
  • 64
  • 4
    According to this http://stackoverflow.com/questions/723195/should-i-use-or-for-not-equal-in-tsql `<>` is ANSI. I don't own a copy of the standard but if correct I guess the question should be the other way round. Edit: Bill Karwin's answer there answers this I think. – Martin Smith Dec 31 '10 at 12:51
  • Thanks. Yes http://stackoverflow.com/questions/723195/should-i-use-or-for-not-equal-in-tsql/723426#723426 answers my question. – bernd_k Dec 31 '10 at 12:59
  • you should maybe delete this then, rather than having it closed...? – gbn Dec 31 '10 at 13:07
  • @gbn the other question is TSQL specific – bernd_k Dec 31 '10 at 13:11

0 Answers0