.Net Interview Questions and Answers

Search:

Are full outer join and Cross join are same? ( SQL Server interview questions with answers)

By : Shiv Prasad Koirala | Oct 19th, 2013 | Views : 5253 | Comments : 0 Bookmark and Share

No, they are not. Full outer join returns common records in both the tables + uncommon records for left table + uncommon records from right table. Where as in Cross Join we will get Cartesian product, that means every record of left table will be combined with every row in right table and result was returned back.

 

Example:

Table 1

Column 1

Column2

A

X

B

Y

C

Z

D

W

Table 2

Column2

Column3

X

XName

Y

YName

P

PName

O

OName

 

Full Outer Join
Select * from Tabl1 inner join Tabl1 Full outer join Tabl2 on Table1.X Full outer join Table2.

Column 1

Column2

Column2

Column3

A

X

X

XName

B

Y

Y

YName

C

Z

NULL

NULL

D

W

NULL

NULL

NULL

NULL

P

PName

NULL

NULL

O

OName

 

 

Cross join
Select * from Table1, Table2

Column 1

Column2

Column2

Column3

A

X

X

XName

A

X

Y

YName

A

X

P

PName

A

X

O

OName

B

Y

X

XName

B

Y

Y

YName

B

Y

P

PName

B

Y

O

OName

C

Z

X

XName

C

Z

Y

YName

C

Z

P

PName

C

Z

O

OName

D

W

X

XName

D

W

Y

YName

D

W

P

PName

D

W

O

OName

 


Below is a nice SQL Server interview questions with answer on inner join , left join and right join.

 

 

For further references please visit www.questpond.com which has more than 600 videos on .Net and SQL Server interview questions with answers.

 
Rate this Article :
1 Star
2 Stars
3 Stars
4 Stars
5 Stars
1 1 1 2 1
 
 
 
 

.NET interview questions 6th edition (Sixth edition) - By Shivprasad Koirala

In this article we will explain .NET interview questions 6th edition (Sixth edition) - By Shivprasad Koirala.... Read More

What is the difference between Stored Procedures and Function (SQL Server interview question with answers)?

In this article we will explain what is the difference between Stored Procedures and Function.For more articles and videos visit us on www.questpond.com... Read More

Explain MVC application life cycle?

In this article we will explain MVC application life cycle.For more articles and videos visit us on www.questpond.com... Read More

C# Design pattern interview questions with answers: - How Singleton is different from Static class?

In this article we will explain How Singleton is different from Static class.... Read More

WCF interview questions and answers: - What is the difference between Service endpoint and Client endpoint?

In this article we will explain What is the difference between Service endpoint and Client endpoint.... Read More

.NET interview questions 6th edition (Sixth edition) - By Shivprasad Koirala

In this article we will explain .NET interview questions 6th edition (Sixth edition) - By Shivprasad Koirala.... Read More

What is the difference between Stored Procedures and Function (SQL Server interview question with answers)?

In this article we will explain what is the difference between Stored Procedures and Function.For more articles and videos visit us on www.questpond.com... Read More

Explain MVC application life cycle?

In this article we will explain MVC application life cycle.For more articles and videos visit us on www.questpond.com... Read More

C# Design pattern interview questions with answers: - How Singleton is different from Static class?

In this article we will explain How Singleton is different from Static class.... Read More

WCF interview questions and answers: - What is the difference between Service endpoint and Client endpoint?

In this article we will explain What is the difference between Service endpoint and Client endpoint.... Read More

Article Categories

Learn in Hindi