sql joins explained
here i want to explain the difference between inner, left, right joins in sql. saying left and right you have to think of tables to the left and right sides of join expression.
inner join
inner join returns records from left table that are present in right table.
left join
left join is similar to inner, but if there is no related records in right table, it will return nulls.
right join
returns all record from the right table that are present in the left one.
full join
there’s also a full join that returns all records from all tables and puts nulls where records does’nt exist.