使用集合来存储查询到的名称,工作,工资
create or replace procedure emp_info_type is
type emp_info_type is record (
empname varchar2(100),
job varchar2(100),
sal number(7,2)
);
empinfo emp_info_type;
begin
select ename,
job,
sal
into empinfo
from emp where empno='7369';
dbms_output.put_line('姓名是'
||empinfo.empname
||'工作是'
||empinfo.job
||'工资是'
||empinfo.sal);
end emp_info_type;