sql - Binary mask oracle -
i have sql command in sql-server, , need migrate oracle, there's part of sql don't understand how translate it. here's sql:
select * mytable id = @id , (mask & @mask) = @mask
i think it's binary mask, i'm not quite sure , don't know if can in oracle, me?
thank much
you correct - binary mask.
oracle provides bitand function, others (bitor, bitxor) must self made.
using bitand function select return value 2:
select bitand(6,2) dual;
so query in oracle can rewritten in following way:
select * mytable id = :id , bitand(mask, :mask) = :mask
Comments
Post a Comment