SqlOtter

Manage indexes and constraints

Inspect keys and indexes, create an index on an existing table, and review staged foreign-key changes with the correct engine and cancellation boundaries.

When to use this

Index lists ordinary and unique indexes, including some constraint-backed entries. Relations stages supported foreign-key changes. The relational Index buttons execute independently; primary/unique constraints and CHECK need their own definition and enforcement checks.

Use this to inspect access paths, add a supported index, prepare a single-column foreign key, or check whether declared relationships are actually enforced.

Before you start

Use an existing disposable demo table, confirm connection/database/Schema and DDL permissions, and keep the original definitions and a recovery copy. A foreign-key example also needs a compatible referenced key and valid existing data. Read the action boundaries before pressing OK, Delete Index or Execute.

Steps

  1. Select the intended existing table in the object tree and open Edit table structure; check the title and wait for metadata.
  2. Inspect Index → Name / Type / Fields / Unique and Relations → local/reference endpoints and actions. Check full server DDL for properties missing from the lists.
  3. For a relational index, review Add Index before OK or the selected row before Delete Index: both immediately attempt database operations without the parent SQL Preview.
  4. For a supported single-column foreign key, use Relations → Add, choose endpoints/name/actions, then return to the pending list. Delete stages removal; directly editing list text is not a saved-definition workflow.
  5. Use Save Changes directly for staged changes, review the full editable SQL Preview and choose Cancel or deliberate Execute. Stop if required DDL is absent or only comments are generated.
  6. Read the outcome, reopen the same target and compare actual metadata/DDL. Verify enforcement separately, and reload actual state before retrying a failed batch.

How to verify the result

A supported command can change the target only when accepted by the server. Confirm the resulting object, ordered columns, reference actions and enforcement/validation state through fresh metadata and the relevant server checks.

Troubleshooting

Limits

Related guides