When you create a procedure (or a function) in Oracle PL/SQL, you cannot specify the maximum length of the varchar2 arguments, only the datatype. For example
create or replace procedure testproc(arg1 in varchar2) is
begin
null;
end;
Do you know the maximum length of a string that you can pass as the arg1 argument to this procedure in Oracle ?
The VARCHAR2 datatype represents variable-length character strings. On most platforms, the maximum length of a VARCHAR2 value is 65535 bytes.
There is no limitation on the size of a plsql block.
The VARCHAR2 datatype stores variable-length character strings. When you create a table with a VARCHAR2 column, you specify a maximum column length (in bytes, not characters) between 1 and 2000 for the VARCHAR2 column.
Maximum Trigger Size The size of a trigger cannot be more than 32K.
In PL/SQL procedure it may be up to 32KB
Futher information here: http://it.toolbox.com/blogs/oracle-guide/learn-oracle-sql-and-plsql-datatypes-strings-10804
I tried with testproc( lpad( ' ', 32767, ' ' ) ) and it works.
With 32768 bytes it fails, so it's 32K - 1 bytes
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With