Rename aliases

dbForge Studio for SQL Server enables you to change the name of an alias. It automatically updates all occurrences and references to the new alias name.

To rename an alias:

1. In the SQL document, select the alias using one of the following methods:

  • Right-click the alias and select Refactoring > Rename.
  • Click the alias and press F2.

The shortcut menu with the Rename menu item

The alias becomes highlighted.

2. Enter a new name for the alias.

3. Optional: To preview the code changes:

3.1. Press F2.

3.2. In the Preview Changes - Rename dialog, view the code changes.

3.3. Click Apply to apply the changes.

Preview the code changes

4. To apply the code changes without previewing, press Enter or Tab.

Note

If the alias matches the column name, renaming the alias doesn’t affect the column name.

Tip

To undo the renaming, press Ctrl+Z.

For more information about customizing alias generation behavior, see Operations with aliases