Using PL/SQL Code Editor

This section covers the following topic:

PL/SQL Code Editor Features

The PL/SQL Code Editor provides several features that help you to quickly and efficiently write PL/SQL and SQL code:

  • Syntax coloring: The PL/SQL Code Editor displays PL/SQL and SQL reserved words in color. Identifiers containing multibyte characters need to be enclosed in double quotes.

  • Brace Matching Feature: The PL/SQL Code Editor supports highlighting of BEGIN-END blocks and matching braces where needed.

  • Collapsible regions: You can hide or show blocks of PL/SQL code by clicking a plus (+) or minus (-) icon next to the code.

  • IntelliSense: IntelliSense offers smart suggestions and code completion for SQL and PL/SQL. As you type SQL or PL/SQL you can take utilize IntelliSense like so:

    • Press Control-Space to receive context sensitive suggestions for keywords and object names. You can select from the suggestions using arrow keys and the return key or by using the mouse.

    • Type a schema name or object name followed by a period (".") to receive suggestions. In the case of procedure or function names, the full signature of the procedure or function name will be outputted along with placeholder values.

    • After typing a procedure or function name, the left parenthesis ("(") will trigger parameter info to be displayed. The current parameter you are entering will be boldfaced.

    • Hover the mouse over variables and object names to display Quick Info about the variable or object name.

    IntelliSense metadata is cached. If you have recently modified database objects, click the Rebuild Intellisense toolbar icon or menu item to receive up to date suggestions.

    To change the casing of suggestions, for example to receive suggestions in lower case, see the IntelliSense Settings Options Page.

  • Compile command: To compile your PL/SQL code and write it to the database, right-click within the PL/SQL Code Editor window and select Compile.

  • Error display: The Oracle Output Window and Task Pane display errors. To jump to a specific error, double-click its error message to move the cursor to the corresponding source line of code. Errors display until the next time you save or compile the PL/SQL code.

  • Lists of Names: The PL/SQL Code Editor displays lists at the top which contain the following information.

    • The name of a stored procedure or function, if one is open, in the list on the left. The list on the right is empty.

    • The name of the package or package body, if one is open, in the list on the left. The list on the right contains entries for all the procedures and functions declared or defined in the package.

    The list on the right can be used to navigate to different procedures and functions.