Renaming Variables

Last modified: October 23, 2019

The Rename functionality provides an easy way to change all occurrences of variable names into new ones to improve code readability and automatically finds and corrects all references to them.

You can rename an object only in a script, and not in a database.

The Rename refactoring is available for local variables.

To rename an object in the SQL editor:

  1. Right-click the required object and select the Rename command on the shortcut menu. Alternatively, you can select the object and press F2. The object will be highlighted.

  2. Type a new name for the object in the SQL editor window. As you type, a tooltip appears instructing to Press F2 to preview changes or Enter/Tab to apply.

  3. Press F2 to open the Preview Changes - Rename dialog window and preview code changes, to apply changes press the Apply button.

  4. Alternatively, press Enter/Tab to apply changes in the code.