16

Possible Duplicate:
Oracle <> , != , ^= operators

in sql, what is the difference between <> and !=, we can use both for "NOt Equal to".

is there any difference in between them?
ex.

select * from student where no != 2;

&

select * from student where no <> 2;

is any advantage of using one insted of another?

What are the main factors because of which != is not made as ISO standard

Community
  • 1
  • 1
Ravindra Bagale
  • 17,226
  • 9
  • 43
  • 70
  • Might want to search the archives first before posting. A very quick search returned http://stackoverflow.com/questions/5856439/difference-between-and-in-sql which seems to ask/answer the same question. – Leigh Dec 07 '12 at 01:36

1 Answers1

23

For SQL Server:

They are the same. Both are two Not Equal To operators. But != is not ISO standard, as quoted from Comparison Operators:

<> (Not Equal To) Not equal to

!= (Not Equal To) Not equal to (not ISO standard)

Mahmoud Gamal
  • 78,257
  • 17
  • 139
  • 164