Below is a "Left Outer Join" example that will be explained in extraneousness detail after the code.\/\/\/
SELECT *
FROM Employee
LEFT OUTER JOIN Jobs
ON Employee.PayGrade = Jobs.PayGrade
Since this is a LEFT OUTER JOIN so it will show all the "Employee" records, and all the "Jobs" records that have a "PayGrade" that is also in the same as the "Employee" "PayGrade".Below is a "Right Outer Join" example that will be explained below the code.\/\/\/
SELECT *
FROM Employee
RIGHT OUTER JOIN Jobs
ON Employee.PayGrade = Jobs.PayGrade
A RIGHT OUTER JOIN is almost exactly the same as a LEFT OUTER JOIN, but instead of having all the records from the first table stated, "Employee", it will have all the records in "Jobs" instead, showing the "Employee" records with the same "PayGrade" of "Jobs".More To Come, CA.
No comments:
Post a Comment