SQL LEFT JOIN Keyword

select * from employeeinfo;

name age address dob
Komal 25 Mumbai 1997-10-19
Ramesh 35 Delhi 1995-08-29
Kaushik 31 Indore 1991-05-05
Hardik 22 Hyderabad 1998-01-25
Glory 28 Kanpur 1990-12-15
Akshaya 29 Delhi 1985-01-28
 select * from employeedep;
name id department
Komal I010 Dev
Akshaya I016 Dev
Ramesh I026 Quality
Hardik I038 Ops
Kaushik I046 Quality
Glory I058 Ops

LEFT JOIN Keyword:

SELECT employeeinfo.name, employeedep.department from employeeinfo LEFT JOIN employeedep ON employeeinfo.name = employeedep.name;

name department
Komal Dev
Ramesh Quality
Kaushik Quality
Hardik Ops
Glory Ops
Akshaya Dev

Leave a Reply

Your email address will not be published. Required fields are marked *