-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
  • 6,062
  • 6
  • 45
  • 71

2 Answers2

1

It is exactly the same operator as <>.

See MSDN for reference.

Andrey Korneyev
  • 25,929
  • 15
  • 67
  • 67
1

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

John Burger
  • 3,584
  • 1
  • 11
  • 22