Inner  Join in Sql Server

“INNER JOIN retrieves all the records from the left table and all the records from the right table.”
 It is similar to intersect operator but basic difference it display the duplicate records. So we used the distinct keyword if we do not find the duplicate record.

Example:
ANSI Style:
select a.Stu_ID,a.Stu_Name from tbl_SchoolRecord a

inner join tbl_StudentRecord b

on a.Stu_ID =b.Stu_ID where a.AdmissionDate>='2010-07-20'

Theta style:

select a.Stu_ID,a.Stu_Name from tbl_SchoolRecord a, tbl_StudentRecord b

where a.Stu_ID =b.Stu_ID and a.AdmissionDate>='2010-07-20'

Leave Comment