whats the difference between !=
and <>
in mysql. which symbol is good to user in sql query for not equal condition.can someone tell me whats the pros and cons of using the not equal symbol in mysql.
!=
requires 3 keystrokes (Shift, !, =), and <>
requires 3 keystrokes (Shift, <, >). However a touch typist has to switch hands to hit that =
.
You should definitely use <>
over !=
. You'll save at least 10 milliseconds of typing for each use.
There is absolutely no difference in MySQL, but the <>
is the variant present in the SQL ISO standard.
If you're interested in trivia I can tell you that Oracle also has ^=
apart from those two.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With