Join in SQL Sever
When we need to select data from more than one table then we can use joins in SQL Server. We can join two or more tables on the basis of common column between these tables.
Consider the following table which I am using in this example:-
Table 1:- Emp_Record
create table Emp_Record(eid int primary key, ename varchar(100), email varchar(100))
create table emp_sal(eid int foreign key references emp_record(eid), salary int, ispermanent varchar(100))
Types of Joins
When we need to select the common data from more than one table then we will use inner join. It will select only those data which will be common in these two tables.