Varray Designer

The VARRAY Designer lets you create or modify varrays. This section covers the following topics:

Creating VARRAYs in Oracle Developer Tools

Use the VARRAY Designer to create VARRAY types.

Starting the VARRAY Designer

Start the VARRAY Designer from the Server Explorer by right-clicking the User-Defined Categories node, and selecting the New Varray. The VARRAY Type Designer, similar to the following appears.

Using the VARRAY Designer

The VARRAY Designer creates new VARRAY types.

The controls in the VARRAY Designer are as follows:

Control Description

Schema name

Select the schema for the new type. The list contains all the schemas that are available to you as defined in the Filters Tab on the Connection Dialog. By default, the schema for the new VARRAY type is the one you have logged in with. If that schema was not defined in the filter tab, then the default schema is the first schema in the sorted list of available schemas.

Type name

Displays the name of the new VARRAY type. By default, the name is generated in the format VARRAYX where X can be any number.

Limit

The maximum size of the VARRAY type. Default is 80.

Element Properties

This section enables you to specify properties for the element of the VARRAY type. The first property, Type, is constant. Other properties change based on the type.

  • Type: The data type of the element of the VARRAY type. The list contains all the database predefined types, ANSI types, and available user-defined types. When the type changes, other attribute properties change.

    You cannot create attributes of these data types: LONG, LONG RAW, ROWID, and UROWID.

  • Size: Represents the size of Character types. Default is 20.

  • Precision: For types DECIMAL, NUMBER, NUMERIC: Represents precision for numeric types. You can specify the precision for the type in this field. The default value is empty, meaning no precision is specified.

    For types TIMESTAMP, TIMESTAMP_WITH_TIME_ZONE, TIMESTAMP_WITH_LOCAL_TIME_ZONE, and FLOAT: Represents the fraction seconds precision for the timestamp type. Default is 6.

  • Scale: For types DECIMAL, NUMBER, NUMERIC: Represents the scale for numeric types. Default value is empty, meaning no scale is specified.

  • Day: For INTERVAL_DAY_TO_SECOND: Represents the day precision for the interval type. Default is 2.

  • Fractional second: For INTERVAL_DAY_TO_SECOND: Represents the seconds precision for the interval type. Default value is 6.

  • Year Precision: For INTERVAL_YEAR_TO_MONTH: Represents the precision in terms of year, Default value is 2.

Preview SQL

Launches the preview SQL Dialog box which displays the CREATE statement that creates the VARRAY type in the database.

Cancel

Closes the dialog box without creating the VARRAY type in database.

Help

Launches the help page for New Varray dialog.

Ok

Creates the VARRAY type in the database and displays any errors in the output window.

The newly created VARRAY type is added to the User-Defined Types in Server Explorer and the VARRAY type definition is opened in the PL/SQL editor.