declare empname emp.emp_name%type; : :
declare -- %ROWTYPEを宣言 dept_rec dept%rowtype; begin -- SELECT INTO句でDEPT表を代入 select * into dept_rec from dept where dept_id = 'D01'; dbms_output.put_line(dept_rec.dept_id); dbms_output.put_line(dept_rec.dept_name); end;