Here is the example of how to use join;
If you need to join Employees to either Stores or Offices depending on where they work
you simply LEFT OUTER JOIN to both tables, and in your SELECT clause, return data from the one that matches:
select
E.EmployeeName, coalesce(s.store,o.office) as Location
from
Employees E
left outer join
Stores S on ...
left outer join
Offices O on ...
OR
select
E.EmployeeName, coalesce(s.store,o.office) as Location
from
Employees E
left outer join
Stores S on ...
left outer join
Offices O on ...
where
O.Office is not null OR S.Store is not null
http://weblogs.sqlteam.com/jeffs/archive/2007/04/03/Conditional-Joins.aspx
Or
SELECT fname, lname, department
FROM names INNER JOIN departments ON names.employeeid = departments.employeeid
Go thr this link for more details;
http://technet.microsoft.com/en-us/library/ms190014.aspx
http://www.sql-server-performance.com/tips/tuning_joins_p1.aspx
Best Luck!!!!!!!!!!
Sujit.