How and why a sql inner left right full and cross join returns the same row count

preview_player
Показать описание
All SQL join types produce same result - Why and How ?

All the SQL queries used in the demo are on our blog at the following link.

Joins in SQL Server Video

Let's gift education together

How to become a full stack web developer
Рекомендации по теме
Комментарии
Автор

What can I say about this guy ?? There is no even words to explain how you helped me you saved my life . Your explanation . No words for you just May God bless and give you what ever you wishes. I wish I can contact you via phone. I want talk to you to explain my deepest gratitude 🙏🏻. Bless you More and more . You are priceless brother

bezaar
Автор

I can never thank you enough for all your wonderful videos, Venkat. You have a gift for explaining things in an easy to understand way. My current job is requiring more advanced SQL than I've ever had to write before, so I always check your channel for help if I run into any blocks.

Cheers!

TheSilent
Автор

Thank you so much for creating the SQL playlist, sir. It's one of the best SQL tutorials available online!

srinivaspachika
Автор

this is the question it was asked for me yesterday interview I have answered only two correctly 😅

saipraneeth
Автор

what if table 1 has 1 column with values (1, 2, 2, Null) and table 2 has 1 column with values (1, 2, 2) the join(left, right, inner) query output result is confusing. Could you please help to understand it. thanks in advance

Saheb
Автор

Hello Sir,
Just wanted to thank you for creating SQL Playlist. By watching these videos it gets easy to crack an interview. I want to ask you that could you please create the same playlist for SSIS, SSAS, SSRS, and Power BI if possible. It would really help us to understand the concepts as an MSBI Developer. Thank you in advance and looking forward to your reply.

rohandesai
Автор

Hi Sir,
Hope you are doing very good.
Your videos are very very helpful.
Your voice is changed. It different in C# videos.
Wish you have a long life.

adityaubale
Автор

This is fun because it takes us out of the data we see in our day-to-day. Usually we join normalized tables using an identity column and so there is no repetition of the IDs and so an inner join would never end up looking like a cross join.

AlexTheUruguayan
Автор

U are wonderful teacher in the Software Environment ..

mr.prasadyadav
Автор

Hello sir, First of all I would like to Thank you for your effort for us.
I want to ask you that will you Please create a course for Database Design.
Because I have searched this course on youTube so much but I've not found a single course that is easy and understandable as your content.
Please ans..
Thanks!

bakarali
Автор

Hi Venkat, Thank you so much for sharing amazing content. I have a quick question could you please let us know how to avoid these scenarios in real time.

akshaykumar
Автор

Sir please make tutorials for Data structures and algorithm using c#

TheTarun
Автор

From table A only one column is there ? How can you select coulumn B from table A

maheshtej
Автор

Is this particulat to this scenario. For eg when i try with a different example say Drop table Departmen
Create Table Departmen
(
DepartmentID int primary key,
DepartmentName nvarchar(50)
)
GO
Drop Table Employee
Create Table Employee
(
EmployeeID int primary key,
EmployeeName nvarchar(50),
DepartmentID int foreign key references Departmen(DepartmentID)
)
GO

Insert into Departmen values (1, 'IT')
Insert into Departmen values (2, 'HR')
Insert into Departmen values (3, 'Payroll')

GO

Insert into Employee values (1, 'Mark', 1)
Insert into Employee values (2, 'John', 2)
Insert into Employee values (3, 'Mike', 1)
Insert into Employee values (4, 'Mary', 2)

GO

select * from Departmen
select * from Employee

select DepartmentName, Count(e.DepartmentID) as TotalEmployees
from Employee e right join Departmen d on e.DepartmentID = d.DepartmentID
group by DepartmentName
order by DepartmentName

select *
from Employee e right join Departmen d on e.DepartmentID = d.DepartmentID
--no of rows returned 5


select *
from Employee e left join Departmen d on e.DepartmentID = d.DepartmentID
--no of rows returned 4


select *
from Employee e full join Departmen d on e.DepartmentID = d.DepartmentID
----no of rows returned 5


select *
from Employee e inner join Departmen d on e.DepartmentID = d.DepartmentID
--no of rows returned 4

select *
from Employee e cross join Departmen
--no of rows returned 12 so this is not a general scenario where joins return a fix number in result everytime.... just posting cause when i first watched the video i thoight this is always true when using joins.. so i thought i put this
thanks for the great content though!!

hasyahaven
Автор

Hlo sir, will you continue with git and angular 6 playlist?

kickOffLiveTV
Автор

very helpful video's but Where is the original Venkat?

qzstutb
Автор

cloud you please tell me how can I download the database that you are using to practice? thank you.

ericahsan
Автор

Heelo Sir, thanks for your job. just one question: your c# playlist in your Youtubechannel is always availabe?
I ask it because you made video since 2012. Thanks again

vauvau
Автор

@kudvenkat ... Explanation is really superb. But if the column A [1, 2] and column B [1, 1, 2] . Then the output will be 3 rows right

chakrigovindarajulubingi
Автор

Your voice has been changed.... Totally different if it is compared with your SQL server tutorial 10 years ago

pawansahu
visit shbcf.ru