oracle游标定义时使用IN,怎么传入参数

2025-03-24 05:46:40
推荐回答(2个)
回答1:

在定义参数游标之后,当使用不同参数值多次打开游标时,可以产生不同的结果集,语法如下:
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

回答2:

该怎么传就怎么传,IN只是表示对应参数只能是传值的方式