Difference between revisions of "Natural Join"

From rbachwiki
Jump to navigation Jump to search
(Created page with "A natural join is based on all columns in two tables that have the same name and selects rows from the two tables that have equal values in all matched columns SELECT first_...")
(No difference)

Revision as of 00:46, 25 October 2017

A natural join is based on all columns in two tables that have the same name and selects rows from the two tables that have equal values in all matched columns

SELECT  first_name, last_name, job_id
FROM employees NATURAL JOIN jobs
WHERE department_id > 80

This join will return columns from the employees table and their job_title from the jobs table based on the common column job_id

Back To Top- Home - Category