Retired products

Lay Out SQL options

You can set a number of options to specify how the Lay Out SQL refactoring reformats your SQL code.

To do this, on the SQL Refactor menu, click Options, and then select the Lay Out SQL tab.

When you change an option, the Preview pane shows the effect on an example script.

There is more information about the effect of individual options in the text within the graphical user interface.

You can save your options settings to an options set so that you can reuse them later. For example, you may wish to save a number of different options sets that you can apply in different circumstances. You can also reset your options to the SQL Refactor defaults. For details, see Options sets.

Default SQL layout behavior

When you select the Lay Out SQL option, your SQL code is laid out using the following principles:

  • Space between statements is preserved.
  • Within a statement, distinct parts of the statement are grouped together.
    For example, simple statements are moved onto a single line; for complex statements, each part of the statement is separated with a line break to visually enhance the structure of the statement.
  • Any white space preceding a semicolon that ends a statement is removed.
  • Indentation is used to indicate structure.
    For example, for multiple line statements, the first line is not indented as far as the subsequent lines. Statements that contain a block of SQL code to be executed (such as IF statements) are indented to group the block.

The options below the General heading apply to all SQL code. Other options apply to specific types of statement, as indicated by the group heading.


Didn't find what you were looking for?