Bitmask Reference
April 25, 2009
I was working with COLUMNS_UPDATED(), and created this reference table for my use. I basically wanted to check if particular columns were updated. I hope this will help someone. 🙂
-
/************************************************************
-
-
Bitmask Reference
-
Created By Marlon Ribunal
-
08/09/2008
-
______________________________________________________________
-
COLUMN 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
-
_____________|_____|______|_____|______|_______|_______|______|
-
9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
-
_____________|_____|______|_____|______|_______|_______|______|
-
17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
-
______________________________________________________________|
-
VALUE 1 2 4 8 16 32 64 128
-
-
-
***********************************************************/
Example of Usage:
updated_bitmask
Is the integer bitmask of those columns actually updated or inserted. For example, table t1 contains columns C1, C2, C3, C4, and C5. To check whether columns C2, C3, and C4 are all updated (with table t1 having an UPDATE trigger), specify a value of 14. To check whether only column C2 is updated, specify a value of 2.
No comments yet