A script-enabled browser is required for this page to function properly.

PL/SQL Editor

The PL/SQL Editor enables you to create and edit PL/SQL program units.

The PL/SQL Editor contains:

Compile

Compiles the program unit appearing in the Source pane. Any error messages generated as a result of the compilation will appear in the scrollable Compilation messages pane.

Apply

Saves any changes made to the program unit in the editor since it was first opened or since the last apply or revert operation. The program unit is not recompiled. The editor remains open.

Revert

Restores the program unit to its state at the last apply or revert operation. If no apply or revert operations have occurred, the program unit is returned to its original state.

New

Displays the New Program Unit dialog box, where you can specify the type and name of the program unit you wish to create.

Delete

Deletes the displayed program unit, with confirmation.

Close

Attempts to close the editor. If any changes have been made but not applied, an alert appears, prompting you to apply or revert the changes or cancel the operation.

Name

Displays the name of the current program unit. Press the arrow to the right of the field to display a list of other existing program units. Click a program unit on this list to display that program unit in the editor.

In addition, the following elements make up the editor window:

Source pane

Area to enter and edit PL/SQL program unit source text.

Split bars enable you to create up to four separate views of the current program unit. Each view can be scrolled independently.

To create horizontal views in the Source pane, place the cursor on the split bar at the top of the vertical scroll bar, and double-click. This splits the Source pane horizontally into two equal-sized views. Alternatively, you can click and drag the split bar down to create the view sizes that you want.

To create vertical views, place the cursor on the split bar at the far left of the horizontal scroll bar, and double-click. This splits the Source pane vertically into two equal-sized views. Alternatively, you can click and drag the split bar to the right to create the view sizes that you want.

To resize views, click and drag the split bar that separates the views.

To remove a horizontal or vertical view, double-click the split bar that separates the views, or drag it to the edge of the pane.

To remove all four views at once, place the cursor on the intersection of the split bars and double-click, or drag it to any corner of the pane.

To select a line of code, place the cursor on the left margin and click.

Compilation Messages pane

Displays error messages, if any, generated as a result of compilation. Clicking on an error message highlights it, scrolls the Source pane to the offending source statement, and positions the text cursor at the location of the error.

By default, the Compilation messages pane appears only when there are compilation error messages generated. However, you can display the Compilation messages pane at any time by moving the split bar at the bottom right corner of the editor.

Split bar

Enables you to change the relative amount of space occupied by the two panes (source and compilation messages). Note that by default, the Compilation Messages pane is displayed only when error messages are generated during compilation.

Status line

Displays information about the current state of the program unit at the bottom of the editor.

Usage notes

When you make changes to a program unit, dependent program units lose their compiled status, which is indicated by an asterisk (*) after their name under the Program Units node in the Object Navigator. You can navigate to those program units directly in the PL/SQL Editor using the Name list to recompile them.

Restrictions