create or replace procedure address_insert
as
CREATE type colorarray is varray(10) of varchar2(10);
CREATE type cities is varray(6) of varchar2(20);
CREATE type states
If you're in SQL*Plus, do a 'SHOW ERRORS'. This also works in SQL Developer's SQL Worksheet.
If you're in a proper IDE - you'll see the errors at compile time.
You can get compilation errors from the DBA_ERRORS or USER_ERRORS views. In your case, try something like
SELECT *
FROM USER_ERRORS
WHERE NAME = 'ADDRESS_INSERT'
Remember that in Oracle table, view, procedure, package, etc names are UPPER_CASE
by default, even if they're shown in lower_case
in your source code.
Right off the top I can see that CREATE TYPE
is not valid in a procedure. You probably want something like
TYPE COLORARRAY IS VARRAY(10) OF VARCHAR2(10)
See the PL/SQL Reference Manual section on defining collection types. for further information.
Best of luck.