displaying different entities from different tables at once code example
Example 1: displaying different entities from different tables at once
SELECT E.first_name NAME,D.department_name DNAME
FROM employees E JOIN departments D
ON (E.department_id = D.department_id);
Example 2: displaying different entities from different tables at once
SELECT E.first_name NAME,D.department_name DNAME
FROM employees E NATURAL JOIN departments D;
FIRST_NAME DNAME
---------- ------
MILLER DEPT 1
JOHN DEPT 1
MARTIN DEPT 2
EDWIN DEPT 2