• Patibandla (7/2/2013)


    What if i define @s-2 as BIGINT

    Can you give me a real time scenario as in this operator would be useful. i am just a bit curious as i have never used used it.

    The last time I saw it used in a database was similar to the city option example given. In this instance, it was used to determine permissions across multiple databases by comparing the database 'lock' (say '01001001') to the user 'key' (say '11011001'). If the bitwise AND came back the same as the database lock, then you had access to the database.

    I would note the field is semantically overloaded. But, that is a different discussion.

    [font="Verdana"]Please don't go. The drones need you. They look up to you.[/font]
    Connect to me on LinkedIn