开发者

Specifying variable size when passing one to the cursor in Oracle

开发者 https://www.devze.com 2023-02-07 13:39 出处:网络
If I define the cursor that accepts 2 parameters like this: CURSOR cur_det (var1 IN varchar2,var2 IN varchar2)IS

If I define the cursor that accepts 2 parameters like this:

CURSOR cur_det (var1 IN varchar2,var2 IN varchar2)  IS

Is it poss开发者_运维问答ible to specify their size? thanks


No, you cannot specify varchar2(100) or something similar. The varchar being passed is not constrained.

You can use the %Type to anchor the parameter to a database column, i.e., my_table.a_column%Type. But I don't think that actually constrains the parameter.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号