2

I was looking for what the <> mean on sql syntax but it was hard to google for it since google removes my special characters.

Specifically I was trying to figure out what the following means:

... AND (s1.skips > 0 OR s1.fails <> 1 OR s2.skips > 0);

Is there any clear documentation talking about the <> clause?

Charlie Parker
  • 5,884
  • 57
  • 198
  • 323
  • `<>` means not equal. See also [this SO question](http://stackoverflow.com/questions/723195/should-i-use-or-for-not-equal-in-tsql). – Ben Whaley Apr 22 '14 at 18:45

3 Answers3

6

Please have a look at the documentation.

Comparison Functions and Operators

Zwirbelbart
  • 777
  • 2
  • 8
  • 19
4

Of course, it's the "not equal"-operator, same as !=, see manual

VMai
  • 10,156
  • 9
  • 25
  • 34
2

<> is the equivalent of != in many other programming languages.

Specifically, your MySQL query makes the following restrictions if any of these are true:

  • s1.skips > 0 - Number of s1 skips is greater than 0
  • s1.fails <> 1 - Number of s1 fails is NOT 1
  • s2.skips > 0 - Number of s2 skips is greater than 0
Sunny Patel
  • 7,830
  • 2
  • 31
  • 46