-1

Using SQL Server 2008 I have a query which resembles this:

SELECT *
FROM myTable mt
WHERE mt.ID !=0

What is the !=0 ? It looks like it's the same as saying <> 0.

I am unable to google this, is this in fact the same? A link to some documentation would be appreciated.

Preston
  • 7,399
  • 8
  • 54
  • 84

2 Answers2

1

It is exactly the same operator as <>.

See MSDN for reference.

Andrey Korneyev
  • 26,353
  • 15
  • 70
  • 71
1

This is the C convention for "not equal". There is another C convention for "equal" that looks like ==.

John Burger
  • 3,662
  • 1
  • 13
  • 23