select * from emps a, payroll b where a.empid = b.empid