Managing Types

A type is a user-specified object or collection definition. You can create, browse, drop a type and view a report.

Oracle Application Express currently only supports collection definitions. There are two categories of Oracle collections (SQL collections):

  • Variable-length arrays (VARRAY types)

  • Nested tables (TABLE types)

VARRAY types are used for one-dimensional arrays, while nested table types are used for single-column tables within an outer table.

See Also:

Creating a Type

Create a type using Object Browser.

To create a collection type:

  1. On the Workspace home page, click SQL Workshop and then Object Browser.

    Object Browser appears.

  2. Click the Create icon.
  3. For Name:
    1. Type Name - Enter the name of the type to be created.

    2. Preserve Case - To have the type name match the case entered in the Type Name field, click Preserve Case.

    3. Type to Create - Specify the kind of type to create.

    4. Click Next.

  4. Follow the on-screen instructions.

    A confirmation page appears, which displays the SQL used to create the type.

  5. Click Create Type.

Browsing a Type

Select a type from the Object Selection pane and view different reports for the type.

To browse a collection type:

  1. On the Workspace home page, click SQL Workshop and then Object Browser.

    Object Browser appears.

  2. From the Object list, select Types.
  3. From the Object Selection pane, select a type.

    The Object Details view appears.

  4. Click the tabs at the top of the page to view different reports for the type.

Reports for Types

Alternative views available when viewing a type in Object Browser.

Table 2-6 describes all available reports for types.

Table 2-6 Available Reports for Types

View Description

Object Details

Displays details about the selected type. To drop a type, click Drop.

Synonyms

Displays a list of synonyms for the current type.

Grants

Displays a list of grants associated with the type. Grant details include grantee, privilege, and grant options. You can perform Grant and Revoke actions.

SQL

Displays the SQL necessary to re-create this type.

Dropping a Type

Select a type from the Object Selection pane and click Drop.

To drop a collection type:

  1. On the Workspace home page, click SQL Workshop and then Object Browser.

    Object Browser appears.

  2. From the Object list, select Types.
  3. From the Object Selection pane, select a type.

    The Object Details view appears.

  4. Click Drop.
  5. To confirm, click Finish.