Select records that fit criteria in another record I have a procedure that I want to return only when a second procedure was selected. 


Id  Name      Procedure 
1  Jim Smith  Procedure1
2  Jim Smith  Procedure2 


I would like the first record returned only if Jim Smith had both procedures.
select t1.* 
  from table t1 
  join table t2 
    on t2.name = t1.name 
   and t1.procedure = 'Procedure1' 
   and t2.procedure = 'Procedure2'