SQL Refactor - 1.3
Learning SQL Refactor - 1.3
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.
See also |
Was this article helpful?
SQL Refactor
- Menu item grayed out
- Removing menu items after uninstalling SQL Prompt and SQL Refactor
- Installation fails when Management Studio is not installed (version 1.1)
- SmartRename is greyed out
- Installer doesn't recognise that SSMS is installed
- Dependency creation in Smart Rename
- Add-in failing to load into SQL Server Management Studio on Vista
- Removing SQL Server Management Studio Integration after uninstallation
- Layout SQL Error
- Log files
all SQL products
- Compatibility of Red Gate tools in 64-bit environments
- Application has encountered an error and needs to close
- Error message after installing SQL Toolbelt - The description for Event ID ( 1 ) in Source ( nview_info ) cannot be found.
- Changing the temporary directory used by the installer
- Toolbelt Installer "hanging" while "scanning volumes"
- Login failing with "trusted SQL Server connection" error when using RunAs
all products
- Some Red Gate products identified as containing a trojan by Anti-Virus software
- Activation may fail with Unknown Error -1
- Product uses web help although a CHM file is available locally
- Argument exception resulting from missing environment variable
- Check for updates may fail when used through proxies
- 'Unidentified Publisher' error when repairing or uninstalling
- Licensing activates product as standard edition
- Moving Red Gate software products to another machine
- Red Gate tools log locations
- The application UI opening slowly when there is no internet access
SQL Refactor
- Activating your products
- Activating your products
- Getting help offline
- SQL Refactor release notes - version 1.xx
all SQL products
all products
- Red Gate product acknowledgements
- Activating your products
- Activating your products
- Red Gate bundle history
- Check for updates
- Troubleshooting Check for Updates errors
- Current versions
- Deactivating your products
- Installing Red Gate products from the .msi file
- Requesting additional activations
- Serial numbers for bundles
- Reactivating using a different serial number
- Extending your trial
- Finding your serial numbers
- Moving a serial number from one computer to another
- No response received for manual activation
- Licensing and activation resources
- Licensing and activation resources
- Troubleshooting licensing and activation errors
- Licensing and activation FAQs
- Red Gate tools log file locations
- Download old versions of products
- Download product prerequisites & utilities
- Support & upgrades
- Upgrading your software
- Upgrading FAQs

Refactorings
Options