Click here to Skip to main content
15,895,740 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
if we having two tables empolyee and department with one common column deptid.
we retrieve data by

1 select * from employee, department where employee.deptid=department.id;

2 select * from employee join department where employee.deptid=department.id;

so which option is better and what is the difference
Posted

A very good commentory over which style to suite can be found here![^]
 
Share this answer
 
I would prefer the second one because of following reasons
- more standard way
- more portable between databases
- can be easily modified to different join types such as outer, full and cross
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900