Joins In SQL SERVER
What are Joins in SQL Server and how we can implement them?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Shivanand ArurRank #920 · 2.3K reputationPosted Sep 25, 2012, 3:23 AM EDT
Lets say that we have 2 tables "Employee" and "Departments"
"Employee" table contains 3 columns
Table Name: Employee Table Name: Department
EmpID Name Profile DeptID DeptName deptCity Profile
01 Shiv S/w Eng 001 IT Chennai S/w Eng
02 Anand Manager 002 Purchase Mumbai Manager
03 Aahan Manager 003 HR Mumbai Manager
Now if you want to get information about the Employee and the Departname in which they work, you can get it through Joins...
"Select Emp.Name, Emp.Profile, Dept.deptCity from Employee Emp, Department Dept JOIN Department Dept ON EMP.Profile = Dept.Profile".
This was just a sample example to explain you. There are various types of JOINS which are as follows:
1. Inner Join: (Refer this site)
http://www.1keydata.com/sql/inner-join.html
2. Outer Join: (Refer this site)
http://www.1keydata.com/sql/sqlouterjoin.html
3. Left Outer Join: (Refer this site)
http://www.1keydata.com/sql/left-outer-join.html
4. Cross Join: (Refer this site)
http://www.1keydata.com/sql/cross-join.html
HOPE this helps you!!!
PLEASE MARK THE ANSWER AS ACCEPTED IF IT HELPED