Users Pricing

blog

home / developersection / blogs / inner join in sql server

Inner Join in Sql Server

Amit Singh 4068 28 Apr 2011 Updated 18 Sep 2014

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'


Amit Singh

Other


2 Comments


Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md