以下过程:
Create or replace procedure proc_yes2
(
OutType varchar(10) --此处必须把(10)去掉才可以编译)
Is
str varchar; --此处又必须写为varchar(10)Begin
str := 'aaa';
End proc_yes2;请问这是什么原因?
Create or replace procedure proc_yes2
(
OutType varchar(10) --此处必须把(10)去掉才可以编译)
Is
str varchar; --此处又必须写为varchar(10)Begin
str := 'aaa';
End proc_yes2;请问这是什么原因?
varchar(10) 表示定义字符串长度为10
(
OutType varchar(10) --此处必须把(10)去掉才可以编译) 这个写的是数据类型
Is
str varchar;
--此处又必须写为varchar(10)Begin
str := 'aaa';
End proc_yes2; Datatypes cannot specify length, precision, or scale. For example, VARCHAR2(10) is not valid, but VARCHAR2 is valid. Oracle Database derives the length, precision, and scale of an argument from the environment from which the procedure is called.