Join same fields

How to join same fields of four tables at SQL Server?

Questions by kadhar

Showing Answers 1 - 1 of 1 Answers

There are 5 types of join in sqlserver
cross join
inner join
left outer join
right outer join
full outer join

cross join
select * from table1
cross join table2
cross join table3
cross join table4
inner join
select * from table1
inner join table2
on table1 .c1=table2.c1
inner join table3
on table2 .c1=table3.c1
inner join table4
on table3 .c1=table4.c1

replace inner join with left outer join/right outer join/full outer join as per requirement

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions