比如下面的存储过程中就有:
declare
cursor mycur is select empno,ename,job from emp;
vempno emp.empno%type;
vename emp.ename%type;
vjob emp.job%type;
begin
open mycur;
fetch mycur into vempno,vename,vjob;
dbms_output.put_line('I Found You!'||mycur%rowcount||'行');
dbms_output.put_line('读取的数据为'||vempno||' '||vename||' '||vjob);
close mycur;
end;
上面sql中下面3句式什么意思?
vempno emp.empno%type;
vename emp.ename%type;
vjob emp.job%type;
有的还放在调用的参数里面
CREATE PROCEDURE p_count(in_sex IN 学生.sex%TYPE, out_num OUT NUMBER);