Table structure and schema editing
Inspect columns, indexes, foreign keys, checks, privileges and DDL for any table, and change columns with a reviewable SQL script before it is applied.
On this page
Open a table's structure to see how it is built, and to change it. The view reads the live schema, so it is always current.
Tabs#
| Tab | Shows |
|---|---|
| Columns | Name, type, nullability, default and badges such as PK, UNIQUE and AUTO INCREMENT. |
| Indexes | Index names, columns and uniqueness. |
| Foreign Keys | Which columns reference which tables. |
| Checks | Check constraints. |
| Partitions | Child partitions, for partitioned tables. |
| Privileges | Who can do what on the table (PostgreSQL). |
| Policies | Row-level security policies (PostgreSQL). |
| Statistics | Table statistics (PostgreSQL). |
| DDL | The full CREATE statement for the table (PostgreSQL). |
Amazon Redshift shows Distribution & Sort and Foreign Keys instead, since it has no indexes or checks. A search box filters the list, and the copy buttons put the column list, CREATE TABLE, CREATE INDEX or foreign-key ALTER TABLE statements on your clipboard.
Change a column#
Edit in place
Change a column's name, type, nullability or default straight in the Columns tab, or add or drop a column. Type names suggest as you type.
Review the SQL
Edits are staged, not applied. The bar at the bottom counts pending changes and Review SQL shows the exact
ALTER TABLEstatements RowDex will run.Apply or discard
Click Apply to run the script, or Discard to drop your edits. If a change would drop a primary-key column, RowDex warns you.
Create and manage objects#
You do not need to leave RowDex to change structure. Right-click an object in the sidebar:
| Right-click on | Actions |
|---|---|
| Schema | Create table, rename schema, drop schema. |
| Table | Create table, rename table, create index, truncate table, drop table, import CSV. |
| View | Drop view. |
| Column | Rename column, drop column. |
The sidebar toolbar also has New table and, for PostgreSQL, MySQL and MariaDB, New database. Available actions vary by engine; unsupported ones are hidden.
Was this page helpful?