+ 1

How to use XOR operator in sql?

4th Feb 2017, 10:53 AM
Snehal Kudale
Snehal Kudale - avatar
4 odpowiedzi
+ 7
XOR means eXclusive OR. It returns true only if only one of the statements is true and the other one is false: 0 xor 0 -> 0 0 xor 1 -> 1 1 xor 0 -> 1 1 xor 1 -> 0
4th Feb 2017, 4:28 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 2
It's when you want that only one value on two is True and otherwise it's simply False. You will find more info here : https://dev.mysql.com/doc/refman/5.7/en/logical-operators.html
4th Feb 2017, 3:36 PM
Hepson
Hepson - avatar
+ 1
@Jignesh : What you said is NOR and not XOR
12th Feb 2017, 12:27 PM
Jacob Paul
Jacob Paul - avatar
0
Thank you both ☺
5th Feb 2017, 1:38 AM
Snehal Kudale
Snehal Kudale - avatar