• I tend to use them all the time, when calling from an application bitmasks provide a easy way to filter data without having to add new parameters.

    E.g.

    create procedure spc_my_proc

    @include_filter int = 0

    , @exclude_filter int = 0

    as begin

    select a.a, a.b, a.c

    from table a

    where a.flags & @include_flags = @include_flags

    and a.flags & @exclude_flags = 0

    end

    That makes retrieving data easy but you have to be aware that it won't work well with large datasets as it doesn't use an index. I find that pretty easy to read too.