MySQL XOR operation

Source: Internet
Author: User

Or a logical operation, the algorithm is simply: Two conditions are the same (true or false) is False (0), two conditions are different is true (1), null and any conditions do not XOR or operation is null, if mathematically understood is that the set and any collection of the intersection is empty.

MySQL xor operator is ^ or XOR


Two conditions that are true are different or, as a result, false.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6E/60/wKiom1V6bq_iUkcwAABEQlyQkaU645.jpg "title=" Xor1.jpg "alt=" Wkiom1v6bq_iukcwaabeqlyqkau645.jpg "/>

Two different conditions for false or false.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6E/60/wKiom1V6by7B3J18AAA-9bDKeD4079.jpg "title=" Xor3.jpg "alt=" Wkiom1v6by7b3j18aaa-9bdked4079.jpg "/>

One condition is true, one condition is false, and the result is true

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6E/5D/wKioL1V6cRDwT65LAABGRaNw770989.jpg "title=" Xor2.jpg "alt=" Wkiol1v6crdwt65laabgranw770989.jpg "/>

Null is different from any condition (true, false, null), and the result is null

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6E/5D/wKioL1V6cVLCp0AtAADUa31dzbA518.jpg "title=" Xor4.jpg "alt=" Wkiol1v6cvlcp0ataadua31dzba518.jpg "/>

What's the use of saying so much? Encountered an XOR SQL injection, is to use this method to judge the ...

This article from "Lao Xu's Private Food" blog, declined to reprint!

MySQL XOR operation

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.