在定义参数游标之后,当使用不同参数值多次打开游标时,可以产生不同的结果集,语法如下:
cursor cursor_name(parameter_name datatype) is select_statement;
定义参数游标时,游标参数只能指定数据类型,而不能指定长度。
示例如下:
declare
cursor temp_cursor(no number) is select name from cip_temps where id=no;
v_name cip_temps.name%type;
begin
open temp_cursor(1);
loop
该怎么传就怎么传,IN只是表示对应参数只能是传值的方式