1: 2: 3: 4: 5: 6: 7: 8: 9:
Select v.* From Vendors v Where Exists ( Select Top 1 Null From Companies c Where v.companyId = c.companyId And c.username = 'user name you pass in' ) ;