January 2, 2012

Bitwise operator in SQL

Bitwise operator performs in the same way as performs in programming language.
There are three bitwise operator here.

1.&(AND)
2.| (OR)
3.^(Exclusive OR)
 
SELECT 5 & 6 AS Result

image

image

SELECT 5 | 6 AS Result

image

image

SELECT 5 ^ 6 AS Result

image

image

That’s It.
Enjoy Learning.

No comments:

Post a Comment