SQL JOINS with Examples
SQL JOIN :- The SQL Joins clause is used to combine records from two or more tables in a database. A JOIN is a means for combining fields from two tables by using values common to each.
INNER JOIN:- An SQL INNER JOIN returns all rows from multiple tables where the join condition is met.
NOTE :- IN Example Using Table find in below link page.
Example:-
LEFT JOIN :- The SQL LEFT JOIN returns all rows from the left table, even if there are no matches in the right table.
EXAMPLE :-
SELECT Emp1.ID,Emp1.Name,Emp1.Company,User1.ID,User1.Name,User1.City
FROM Emp1
LEFT JOIN User1
ON Emp1.ID=User1.ID;
RIGHT JOIN:- The SQL RIGHT JOIN returns all rows from the right table, even if there are no matches in the left table.
EXAMPLE :-
Nice and very great information. Keep sharing.
ReplyDeleteCustom software company India
This is my first visit to your blog, your post made productive reading, thank you.Application development company India
ReplyDelete