Managing Types
A type is a user-specified object or collection definition. Use Object Browser to create, view, or drop a type.
Oracle APEX currently only supports collection definitions. There are two categories of Oracle collections (SQL collections):
-
Variable-length arrays (
VARRAYtypes) -
Nested tables (
TABLEtypes)
VARRAY types are used for one-dimensional arrays, while nested table types are used for single-column tables within an outer table.
See Also:
-
Oracle AI Database PL/SQL Language Reference and for information about collection types
Creating a Type
Create a type using Object Browser.
To create a collection type:
-
In Object Browser, click the Create Database Objects menu and select Type.
Tip:
To create new objects from the Object Tree, right-click the object and select the Create option.
The Create Type Wizard appears.
-
On Create Type:
-
Type Name - Enter the name of the type.
-
Set the Collection Type:
-
VArray (variable-size array) - Creates an ordered set of elements, each with the same data type.
-
Nested Table - Creates a named nested table of selected data type.
-
-
Limit (VArray only) - Enter the number of elements in the VArray. This value must be a valid positive integer.
-
Data Type - Specify the data type of the collection elements.
-
Length - Enter the length of the selected data type. This value must be a valid positive integer.
This field changes to Object for the configuration “Nested Table, < Nested Object >.”
-
-
Click Create Type.
Viewing a Type
Select a type from the Object Tree and access tabs in the Object Detail View.
To browse a collection type:
-
In Object Browser, Object Tree, expand Types and select a type to view.
-
The Object Detail View appears and displays four tabs:
-
Object Details - Displays details about the selected type. Available actions include:
-
Drop.
-
Refresh
-
-
Synonyms - Displays a list of synonyms for the current type. Available actions include:Refresh.
-
Grants - Displays a list of grants associated with the type. Grant details include grantee, privilege, and grant options. Available actions include:
-
Grant
-
Revoke
-
Refresh
-
-
DDL - Displays the DDL necessary to re-create this type. Available actions include:
-
Download.
-
Refresh
-
-
Dropping a Type
Select a type from the Object Tree pane and click Drop on the Object Details tab.
To drop a collection type:
-
In Object Browser, Object Tree, expand Types and select a collection type.
The Object Detail View appears.
-
On the Object Details tab, click Drop.
-
Drop - Review the details.
-
SQL - Displays the SQL generated to drop the type. To copy the displayed SQL, click the Copy icon.
-
To confirm your selection, click Drop again.
-