It has been a long time since we have puzzle on this blog so let us have a quick puzzle this Friday. It is based on Bit Wise Operator and very simple if you know those operators.
We will guess the output of the SQL script.
For example, here is the select statement:
SELECT 10 & 10
Upon executing it will return us answer as a 10.
However, when I execute following two queries, both of the queries give an answer as Zero.
SELECT 10 & 0;
SELECT 1 & 100;
Here is the question for you – why is it giving answers as zero? Please leave your answer in a comment below.
Reference: Pinal Dave (https://blog.sqlauthority.com)