Declaring local variables of type array
Declaring array data type variables is a task that you perform after creating array data types if you want to be able to temporarily store or pass array data type values.
Before you begin
- Read: Array data types
- Read: Restrictions on the array data type
- Read: Creating an array data type (CREATE TYPE statement)
- Ensure that you have the privileges required to execute the DECLARE statement.
About this task
Procedure
Results
If the statement
does not execute successfully due to an error with the DECLARE statement:
- Verify the SQL statement syntax of the DECLARE statement and execute the statement again.
- Verify that no other variable with the same name has already been declared within the same context.
- Verify that the array data type was created successfully.
What to do next
After declaring associative array variables, you might want to assign values to them.