Oracle PL/SQL - %ROWTYPE Variable Represents Join Row

Introduction

The following code defines an explicit cursor whose query is a join and then declares a record variable.

DECLARE 
  CURSOR c2 IS 
    SELECT empid, email, emp.manager_id, location_id 
    FROM emp, departments 
    WHERE emp.department_id = departments.department_id; 
   
  join_rec c2%ROWTYPE;  -- includes columns from two tables 
   
BEGIN 
  NULL; 
END; 
/ 

Related Topic