Suppose I have these tables
create table bug ( id int primary key, name varchar(20) ) create table blocking ( pk int primary key, id int,
select * from #bug t1 left join #blocking t2 on t1.id = t2.id and t2.name = 'qa bug'