SqlOtter

Create and edit table structure / Copy and rename tables

Rename multiple selected tables

Use one naming rule to rename selected tables, and compare all original and new names before submitting.

Where to open it

Object tree → select two or more tables → Table → Rename Table, or right-click the selection → Rename Table

Shortcuts and controls

The existing table action opens the batch dialog when two or more tables are selected in the object tree.

Shortcuts and controls
ActionWindows / LinuxmacOSFocus and effect
Open Rename TableF2F2 (Fn if required)Use the object-tree selection in the active database/Schema.
Choose a naming modeDialog controlsDialog controlsChoose Prefix and suffix or Find and replace; the modes are mutually exclusive.
Submit / cancelOK / CancelOK / CancelOK validates destinations and starts the operation, subject to any further confirmation. Cancel closes the setup without submitting it.
  • Settings → Shortcuts can override the main-window defaults. There is no separate default shortcut for the batch naming rules.

Before you start

Check the connection, database and Schema, select the intended tables and confirm rename permissions and application dependencies.

Follow these steps

  1. Select two or more table items in the object tree and choose Rename Table. Rename Selected Tables lists the original names alongside the generated new names.
  2. Choose Prefix and suffix to add text before or after each original name, or choose Find and replace to replace text within the names. Only one naming mode is active at a time.
  3. For the pictured example, select Find and replace, enter test in Find and copy in Replace with. Matching is literal and case-sensitive; every occurrence is replaced, including repeated matches in the same name.
  4. Check every Original name / New name pair. Yellow highlights the original matches and green highlights the replacement text. For example, new_table7_test1_test3_test1 becomes new_table7_copy1_copy3_copy1.
  5. Resolve empty or duplicate destination names and existing-object conflicts. At least one name must change; unchanged tables are skipped. Click OK to submit the changed pairs, review any further confirmation, or choose Cancel to abandon the setup.
  6. Review the result and any failed pair, refresh the same database/Schema and verify the names. Check affected queries and application references before continuing work.
Rename Selected Tables with Find and replace selected, test replaced by copy, and yellow original matches beside green replacements in three preview rows.
Find and replace changes every test occurrence to copy in the three selected table names. Yellow marks the original matches and green marks the replacement text. Prefix and suffix is the alternative naming mode.

Example

Find test → replace with copy: new_table7_test1_test3_test1 → new_table7_copy1_copy3_copy1; new_table7_test1_test6_test1 → new_table7_copy1_copy6_copy1; new_table7_test1_test4 → new_table7_copy1_copy4.

What to expect

Successfully renamed tables appear under their new names. A table whose generated name is unchanged is left as it is. Rename changes the existing object’s name rather than creating a copied table.

Scope and limits

  • Find and replace uses plain text, not regular expressions. Leaving Find empty makes no replacement; an empty replacement removes matching text if the remaining names are valid.
  • The read-only preview updates from the naming controls. Leading/trailing whitespace is trimmed, and an applicable force-uppercase setting can change the resulting names.
  • Existing target names are checked before execution. Engine naming rules and permissions still apply; the preview is not a guarantee that the server will accept every name.
  • Renames run in sequence and can partially succeed. Inspect completed and failed pairs before retrying; there is no guaranteed whole-batch undo or automatic repair of external application references.

If something goes wrong

  • OK disabled: ensure at least one name changes and no generated name is empty or duplicated. Check the active naming mode and exact letter case of Find.
  • Destination already exists: adjust the rule. Renaming one selected table onto another selected source name is also rejected; this batch does not swap names.
  • Partial failure: refresh the source database/Schema and inspect the completed count and failed pair before choosing a new selection and retrying.