1. Select Preferences > SQL Editor.
  2. Change the settings as appropriate in each section and then click Apply

See the following topics to configure other SQL Editor preferences. 

Specify Code Assist Preferences

The Code Assist panel is used to specify configuration parameters that determine how code completion features in SQL Editor behave.

Select Preferences > SQL Editor and then in the Preferences dialog, expand SQL Editor and click Code Assist.

The following describes the options on the Code Assist Preferences page.

Select background or foreground options from the menu and modify them as appropriate.

Specify Code Formatter Preferences

The Code Formatter pane provides configuration options for code formatting functionality in SQL Editor.

Select Preferences > SQL Editor and then in the Preferences dialog, expand SQL Editor and click Code Formatter.

The panel provides a drop down list of formatting profiles and a preview window that displays how each profile formats code.

If you create a new profile with a name that already exists in the system, a prompt will appear asking you to change the name of the new code formatting template. 

Create and edit Code Formatting Profiles

You can create your own code formatting profiles that will define how your SQL code is formatted.

  1. Select Preferences > SQL Editor and then in the Preferences dialog, expand SQL Editor and click Code Formatter.
  2. On the Code Formatter pane, click Show or New and a dialog similar to the following appears. 

  3. Make your changes, click Apply to preview your changes and then click OK to create the new profile or to exit the Show Profile dialog. 
  4. Use the preview pane to preview the changes you make to your code formatting preferences. Changes are not implemented until you click Apply or OK.

Specify Code Quality Preferences

The Code Quality preferences allow you to specify the severity level for several categories of problems that result in inefficient or erroneous SQL.

  1. Select Preferences > SQL Editor and then in the Preferences dialog, expand SQL Editor and click Code Quality.

  2. Change the severity levels by clicking the list next to the category and choosing the level. 
  3. To save your changes, click Apply.

Specify Results Viewer Preferences

The Results Viewer pane provides configuration options that specify how the Results view displays or saves results.

  1. Select Preferences > SQL Editor and then in the Preferences dialog, expand SQL Editor and click Results Viewer.

  2. Make your preference changes and then save your changes by clicking Apply. The following describes the preference options available:

Specify SQL Templates Preferences

The SQL Templates panel provides customization options for creating and modifying SQL code templates.

  1. Select Preferences > SQL Editor and then in the Preferences dialog, expand SQL Editor and click SQL Templates.
    The SQL Templates panel displays a list of all SQL code templates currently available. Additionally, when you select a template from the list, the Preview section displays the code block as it will appear when the template is selected in SQL Editor.
  2. Click on the check box beside each template to specify if it is included in the code assist check or not, within SQL Editor. Use the buttons on the right-hand side of the panel to create, edit, or delete SQL templates, as needed.
    When you create or edit a template, the Edit SQL Template dialog appears. 
  3. Enter a Name, Description, and Pattern in the fields provided, and click OK.
    If the template name doesn't match an existing SQL code template, your new template is added to the list, and will automatically be considered when the code assist function is executed in SQL Editor. 
  4. Select the Use Code Formatter check box to apply code formatting preferences to the specified template. See Specify Code Formatter Preferences for more information about setting code formatter preferences.

Specify Syntax Coloring Preferences

The Syntax Coloring panel provides configuration options that change the look and feel of code syntax in SQL Editor.

  1. Select Preferences > SQL Editor and then in the Preferences dialog, expand SQL Editor and click Syntax Coloring.
  2. Use the tree view provided in the Element window to select the comment type or code element you want to modify. Select the options to the right-hand side of the window to modify it.
    The Preview window shows a piece of sample code that updates according to the changes you made.


 |    |  |   |   |