Refactoring |
The SQL Enlight Refactoring commands can make intelligent changes to the T-SQL source code.
- Encapsulate as Stored Procedure
Convert the selected code into
a new stored procedure and optionally replace it with a call to the new procedure. - Encapsulate as Scalar Function
Convert the selected code into
a new scalar function and optionally replace it with a SELECT of the function return
value. - Encapsulate as Inline Function
Convert the selected code into
a new inline table-valued function and optionally replace it with a SELECT from
the new function. - Encapsulate as View
Convert the selected code into a new view
and optionally replace it with a SELECT from the new view. - Encapsulate as SP_ExecuteSQL Call
Convert the selected code into
a call to the sp_executesql stored procedure. - Extract to Separate Script
Create a new SQL document and extract
the selected code to it. - Extract T-SQL Object’s Body to Separate Script
Create a new SQL
document and extract the selected body of the selected CREATE/ALTER procedure, function
or view to the new document. - Expand SP_ExecuteSQL Call
Expand the selected call to the sp_executesql
procedure. - Qualify Object Names
Add schema name to all the not qualified
objects found in the selected T-SQL script. - Expand Wildcards
Expands SELECT * statements.
- Add Statement Terminators
Ensures that all statements are terminated with semicolon.
- Delimit/Undelimit Identifiers
Delimit and Undelimit identifiers