sqlchild
sqlchild

Reputation: 9074

Use of greater and less than signs together in mysql query <>

What does the <> sign mean in MySQL? I saw it in a query, and could not understand what it is.

Upvotes: 19

Views: 19643

Answers (4)

EricB
EricB

Reputation: 31

It means 'Not Equal' just as != means 'Not Equal'.
Literally the symbols mean less than and greater than. Since those two operators are mutually exclusive, putting them together is an impossibility and therefore, NOT EQUAL.

Upvotes: 3

user684202
user684202

Reputation:

It's basically the same thing as !=. You could read <> as "less-than or greater-than".

Upvotes: 0

Acn
Acn

Reputation: 1066

Use != operator instead. <> is some oldy goldy way of operating NOT EQUAL TO.

Upvotes: 6

Tom
Tom

Reputation: 3063

It means not equal, so these two are equivalent

a != b
a <> b

Upvotes: 30

Related Questions