I have multiple user groups. Groups are assigned operations in which they can perform. These 2 particular groups should have equal operations assigned but currently they are not. One group has 501 and the other 504 operations assigned. I thought I could quickly determine which operations I am missing. I am trying this:
oh, group 21 is the one with the correct operations assigned to it. I also realize that I could delete all records for group 11 and perform an insert statement based on group 21 but where is the fun in that?
Code:
select a.op_id from op_groupings a
where a.group_id = 21
and not exists(select b.op_id from op_groupings b
where b.group_id = 11)
oh, group 21 is the one with the correct operations assigned to it. I also realize that I could delete all records for group 11 and perform an insert statement based on group 21 but where is the fun in that?