确实是不可以的You cannot constrain the datatype of a parameter. For example, the following declaration of acct_id is illegal because the datatype CHAR is size-constrained: PROCEDURE reconcile (acct_id CHAR(5)) IS ... -- illegalHowever, you can use the following workaround to size-constrain parameter types indirectly: DECLARE
SUBTYPE Char5 IS CHAR(5);
PROCEDURE reconcile (acct_id Char5) IS ...
也就是说,如果你想用Number(9,2) 就先给它定义一个类型吧
比如DECLARE
SUBTYPE Number IS Number(9,2);语法就是这样,没有为什么……
SUBTYPE Char5 IS CHAR(5);
PROCEDURE reconcile (acct_id Char5) IS ...
也就是说,如果你想用Number(9,2) 就先给它定义一个类型吧
比如DECLARE
SUBTYPE Number IS Number(9,2);语法就是这样,没有为什么……
SUBTYPE Number92 IS Number(9,2);
就想定义varchar2一样,不能定义长度.
只能用number , varchar2