select userid from userrole where userid = 1
intersect
select userid from userrole where userid = 2
intersect
select userid from userrole where userid = 3
Won't this solve the problem? How good a solution is this on typical Relational DBs? Will query optimizer auto optimize this?