create or replace procedure pro1(v_in_empno in number) is --定义一个记录数据类型 type my_emp_record is record( v_ename emp.ename%type, v_sal emp.sal%type, v_job emp.job%type ); --定义一个变量,变量类型为my_emp_record v_emp_record my_emp_record; begin select ename,sal,job into v_emp_record from emp where empno=v_in_empno; dbms_output.put_line(‘名字:‘||v_emp_record.v_ename||‘ 工资‘||v_emp_record.v_sal); end;