I'm researching some long running queries and came across a query of this format:
UPDATE t1
SET inheritedmask = t1.inheritedmask | t2.mask | t2.inheritedmask | 0x08000000
FROM table1 t1
JOIN table1 t2 ON (t1.id = t2.id)
where t1.objectid = @referencingobjectid
AND t1.objecttypecode = @referencingobjecttypecode
AND t2.objectid = @referencedobjectid
AND t2.objecttypecode = @referencedobjecttypecode
I've never come across a query with the bitwise operator in the SET part of the query and just curious about exactly what this is doing?