0

Does these 3 queries give the same result?

1. select * from table_name where not column_name = 'value'; 2. select * from table_name where column_name <> 'value'; 3. select * from table_name where column_name != 'value';

3rd May 2017, 5:57 PM
Madhur Munjal
Madhur Munjal - avatar
2 Answers
+ 3
Cause <> and != are the same operator (not equal) in the dB engines which support both. And not(a=b) is equivalent to a<>b.
3rd May 2017, 6:27 PM
Tob
Tob - avatar
+ 3
Yes, this should give the same result.
3rd May 2017, 7:03 PM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar