lean lean - 4 months ago 14
SQL Question

What does "<>" symbol mean?

I read the Laravel manual and found this symbol in the code below:

select * from users where name = 'John' or (votes > 100 and title <> 'Admin')


So what dose "<>" mean? Is it the same with "!="?

Answer

Both != and <> has same Properties IN SQL:

!= :
Checks if the values of two operands are equal or not, if values are not equal then condition becomes true.

(a != b) is true.

<>:

Checks if the values of two operands are equal or not, if values are not equal then condition becomes true.

(a <> b) is true.