Cara Menampilkan Data Dari Beberapa Tabel Dengan Beberapa Metode (ORACLE)
SELECT Employees.department_id, Employees.last_name,
Departments.department_name
FROM Employees, Departments
WHERE Employees.Department_id=Departments.Department_id
SELECT E.department_id, E.last_name, D.department_name
FROM Employees E JOIN Departments D
ON E.Department_id=D.Department_id
SELECT last_name, department_name
FROM employees
NATURAL JOIN departments
SELECT E.department_id, E.last_name, D. department_id, D.department_name
FROM Employees E, Departments D
WHERE E.Department_id(+)=D.Department_id
- Penggabungan tabel itu sendiri (Joining a Table to Itself)
SELECT Karyawan.last_name || ' bawahan dari ' || Manager.last_name
FROM Employees Karyawan, Employees Manager
WHERE Karyawan.manager_id= Manager.employee_id
SELECT last_name, department_name
FROM employees
CROSS JOIN departments
Postingan terkait:
Belum ada tanggapan untuk "Cara Menampilkan Data Dari Beberapa Tabel Dengan Beberapa Metode (ORACLE)"
Post a Comment