I have a SQL command in SQL-Server, and I need to migrate it to Oracle, but there's a part of the sql that I don't understand how to translate it. Here's the sql:
select * from myTable where id = @id and (Mask & @Mask) = @Mask
You are correct - this is binary mask.
Oracle provides only BITAND function, others (BITOR, BITXOR) must be self made.
Using BITAND function this select will return value 2:
SELECT BITAND(6,2) FROM DUAL;
So your query in Oracle can be rewritten in following way:
select * from myTable where id = :id and BITAND(Mask, :Mask) = :Mask