1> employee_master(emp_id int primary key, emp_name varchar(100));
2> employee_salary_payment(salary_rid int primary key, emp_id int, sal_date date, paid_amt int);
The tables, employee_master and employee_salary_payment have one to many relation.
I need to list the salary payment done for the employee having id = 10. Here I use two different querry to work.
Querry 1:
Expand|Select|Wrap|Line Numbers
- Select em.emp_id, em.emp_name, esp.sal_date, esp.paid_amt
- from employee_master em join employee_salary_payment esp
- on (em.emp_id = esp.emp_id and em.emp_id = 10);
Expand|Select|Wrap|Line Numbers
- Select em.emp_id, em.emp_name, esp.sal_date, esp.paid_amt
- from employee_master em join employee_salary_payment esp
- on em.emp_id = esp.emp_id
- where em.emp_id = 10;
Both the querry will give the same performance?
If no, what is the reason?