I need some help about executing expression(bitwise) stored in a column of a table.
Input :
ID | expression ----|------------- 1 | 1&0 2 | (1&1)|(0&1)
Desired Output :
ID | expression | value ----|-------------|------- 1 | 1&0 | 0 2 | (1&1)|(0&1) | 1
I am trying something like below but it is not executing the expression.
PREPARE stmt from 'select ? into @outvar';
set @invar = '1&0';
execute stmt using @invar;
select @outvar;
The output of above is 1&0 but the desired output is 0.
Actually I want to store the output in a variable as framed in my above pseudo code.