About SQL Refactor
Published 15 May 2013
SQL Refactor enables you to improve the appearance or structure of your SQL code without changing its behavior.
SQL Refactor is compatible with SQL Server 2008, SQL Server 2005, and SQL Server 2000. It can be integrated into Microsoft SQL Server 2008 Management Studio and Microsoft SQL Server 2005 Management Studio.
You can use SQL Refactor to:
Format your SQL code and database objects. The following refactorings are provided:
- Encapsulate as New Stored Procedure creates a new stored procedure from selected SQL code, and optionally replaces the selected code with a reference to the stored procedure.
- Expand Wildcards expands subqueries that contain SELECT * or SELECT table.* so that they list all of the columns.
- Find Unused Variables and Parameters highlights any variables or parameters in a script that are declared or assigned values but not used, and any values that are not used.
- Lay Out SQL reformats your SQL code to make it more readable without changing its behavior.
- Qualify Object Names modifies the script so that all object names are qualified in the format [owner].[object]
- Smart Rename generates a script to rename objects, columns, or parameters in a database without breaking dependencies so that the integrity of the database is maintained.
- Split Table generates a script that copies and moves columns from an existing table to a new table whilst retaining the original data and modifying referencing objects to maintain database integrity. You can use this feature to create tables to enforce domain restrictions using referential integrity.
- Summarize Script displays a summary of the actions that a script will perform in the order in which they will occur.
- Uppercase Keywords puts keywords into uppercase.
Set up options for your refactorings, and save them as options sets.