Documentation

SQL Table Info

SQL Table Info

The Table Info (a.k.a. Table Management) activity is the single place to inspect and evolve an existing SQL table. It groups everything about a table — schema, triggers, constraints, partitions, storage — into tabs, and lets you switch into an edit mode that tracks additions, renames, type changes, and deletions before emitting the correct ALTER TABLE operations.

Quick Start

  1. Open the activity from a table's context menu (Table Management) or from the palette.
  2. Review the read-only Schema tab: columns, types, PKs, indexes, foreign keys.
  3. Click Edit to enter diff-aware mode. Add, rename, retype, or delete columns; new rows are highlighted green, modified rows yellow, and deletions red.
  4. Click Save to preview and apply the generated ALTER TABLE operations.
  5. Use Show DDL in the top bar at any time to inspect the current CREATE TABLE + index statements.

Opening It

The activity opens with a breadcrumb showing connection → database → table → Table Management. Use the top-right buttons to:

  • Show DDL — pops open a code viewer with the CREATE TABLE statement and any associated CREATE INDEX statements.
  • Refresh — reloads the schema, triggers, constraints, partitions, and storage stats.

Schema Tab

Read-only view lists every column with the following attributes:

ColumnMeaning
ColumnIdentifier; primary-key columns are highlighted with a key icon and an AI badge marks auto-increment.
TypeData type as reported by the driver (e.g. INTEGER, VARCHAR(255), NUMERIC(12,2)).
NullableYes or No.
DefaultServer-side default, if any.
PKCheckmark when the column participates in the primary key.
IndexedCheckmark when the column is covered by an index.
CardinalityOptional statistic; visible when the driver returns it.
CommentColumn comment, when set.

Renaming the Table

Click Rename at the top of the schema tab, edit the identifier inline, then press Enter or click Apply. Cancel with Esc.

Edit Mode — Diff-Aware Editing

Click Edit to unlock a table-shaped editor with per-row status:

  • Green — new column
  • Yellow — modified column
  • Red — column marked for deletion (Undo restores it)

Each row exposes: name, type + size(1)/size(2), unsigned for numeric types, default, PK toggle, nullable toggle, and an expandable panel for auto-increment (with Seed/Step) plus a comment field. Invalid names show an inline validation error.

When you press Save, VisuaLeaf builds a batched set of ALTER operations, e.g.:

ALTER TABLE users
    ADD COLUMN phone VARCHAR(32) NULL,
    ALTER COLUMN email TYPE VARCHAR(320),
    ALTER COLUMN email SET NOT NULL,
    DROP COLUMN legacy_flag;

COMMENT ON COLUMN users.phone IS 'E.164 formatted';

Foreign Keys

Below the columns, the schema tab lists foreign keys with columns → referenced table/columns, plus ON DELETE / ON UPDATE actions. Edit mode lets you add new FKs, remap column pairs, or drop existing constraints. Type mismatches between local and referenced columns raise inline warnings before save.

Indexes

All non-primary indexes are shown with name, columns, and uniqueness. Edit mode supports creating new indexes and dropping ones you no longer need.

Triggers Tab

Lists trigger definitions attached to the table. Each entry can be opened in the code viewer to inspect the full CREATE TRIGGER body.

Constraints Tab

Enumerates check constraints, unique constraints, and other named constraints reported by the driver. Useful for auditing data-integrity rules alongside schema.

Partitions Tab

For dialects that support partitioning, this tab lists partition names, expressions, and row counts. Non-partitioned tables show an empty state.

Storage Tab

Shows storage-level metrics: data size, index size, total size, row estimate, and (where the driver reports it) tablespace or engine.

Safety Tips

  • Preview the generated DDL before saving — VisuaLeaf shows a confirmation dialog listing every operation.
  • SQL Server cannot add an IDENTITY attribute to an existing column; the UI warns inline when this is attempted.
  • Deleted columns are reversible until you press Save; use the Undo icon to restore.

Ready to try VisuaLeaf?

Download and start managing your MongoDB databases with ease.

Download Free Trial