d-man
d-man

Reputation: 58063

oracle alter type compilation error

Oracle.

I have type as following

create or replace 
type string_varray as varray(200) of varchar2(1000);

I wants to increase size of varray from 200 to 1000 i tried following statement didn't work out for me

alter type string_varray MODIFY ( varray(1000) of varchar2(1000)) cascade;

Error
Error starting at line 4 in command:
alter type string_varray MODIFY (varray(1000) of varchar2(1000)) cascade
Error report:
SQL Error: ORA-22324: altered type has compilation errors
ORA-22328: object "DSC_APP"."STRING_VARRAY" has errors.
PLS-00103: Encountered the symbol "(" when expecting one of the following:

   limit element
22324. 00000 -  "altered type has compilation errors"
*Cause:    The use of the ALTER TYPE statement caused a compilation error.
*Action:   Correct the error reported and resubmit the statement.

Upvotes: 1

Views: 667

Answers (1)

Abhishek
Abhishek

Reputation: 2490

Try this -

alter type string_varray modify limit 1000;

The syntax that you are using will increase the element size like this -

alter type string_varray modify element type varchar2(2000) cascade;

Upvotes: 1

Related Questions