Charlie Parker
Charlie Parker

Reputation: 5301

What does <> mean on SQL

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?

Upvotes: 2

Views: 132

Answers (3)

VMai
VMai

Reputation: 10336

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

Upvotes: 4

Zwirbelbart
Zwirbelbart

Reputation: 827

Please have a look at the documentation.

Comparison Functions and Operators

Upvotes: 6

Sunny Patel
Sunny Patel

Reputation: 8077

<> 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

Upvotes: 2

Related Questions