SQL JOINS interview questions and answers || Learn SQL Joins easy way
ฝัง
- เผยแพร่เมื่อ 7 ต.ค. 2024
- In this Video we will learn about the SQL JOINS , and how we get result sets.
we have different type of SQL JOINS:
Inner Join/ Join
Left Join
Right Join
Full Join/Outer Join/Full Outer Join
Cross Join
Given that we have two tables with 2 different datasets with duplicate and null values, we try to fetch the number of record based on different joins.
create table A ( IDA int)
Create table B (IDB int)
insert into A values (1),(1),(1),(2),(2),(NULL);
insert into B values (1),(1),(2),(NULL),(NULL);
select * from A;
select * from B;
select * from A join B on A.IDA= B.IDB
select * from A Left join B on A.IDA= B.IDB
select * from A Right join B on A.IDA= B.IDB
select * from A full outer join B on A.IDA= B.IDB
select * from A cross join B
#sqlinterviewquestionsandanswers #sqlinterview #sqlbeast #sqlserver #sqljoins - วิทยาศาสตร์และเทคโนโลยี