Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
SQL
select 1024 & 1222
select 1024 | 1222

out put

1024
1222

How sql perform this operation

select 1300 & 1222

giving me output 
1028

select 1300 | 1222
giving me output 
1494
Posted
Updated 6-Feb-14 18:47pm
v3

1 solution

Check this BitWise & [^]
Bitwise | [^]



1300 -> 10100010100
1222 -> 10011000110
----------------------
10111010110 --->> 1494

Simulator [^]
 
Share this answer
 
v2
Comments
Siva Hyderabad 7-Feb-14 4:14am    
+5
Karthik_Mahalingam 7-Feb-14 4:16am    
Thanks Rao:)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900