View MySQL table structure and DDL

To see how a MySQL table is defined, select the connection in the Explorer, pick the database, then click the inspect button next to the table name, or click Structure in the tab toolbar. The inspector has three tabs: Columns, Indexes and DDL.

All three are read with metadata statements (SHOW FULL COLUMNS, SHOW INDEX and SHOW CREATE TABLE), so the account only needs permission to see the table. Nothing is changed.

Open the inspector

  1. Select a MySQL connection in the Explorer.
  2. Choose a database in the selector under the connection. If the list fails to load, click Retry database list.
  3. Hover a table and click its inspect button, or open the table and click Structure in the toolbar.

The header shows the table name and the database. The summary row lists the database, the number of columns and the number of index entries.

What each tab shows

Tab Source What you get
Columns SHOW FULL COLUMNS FROM db.table Field, type, collation, nullability, key, default, extra, privileges and comment
Indexes SHOW INDEX FROM db.table One row per index column: key name, sequence, column, uniqueness, index type
DDL SHOW CREATE TABLE db.table The server’s own CREATE TABLE statement, with a Copy DDL button

Views work too. For a view, the DDL tab shows the CREATE VIEW statement and the Indexes tab stays empty, because views have no indexes of their own.

Click Refresh to read the definition again after a migration, or Open query to open a query tab for the table.

Database scope per tab

The database selector in the Explorer sets the scope for new tabs. Each query tab remembers the database it was opened with, so you can keep app and app_archive open side by side. Changing the selector does not close or retarget existing tabs. See query tabs.

Names with unusual characters, including backticks, are quoted correctly, so tables such as odd`name open normally.

Limits

  • The structure view is read-only. Editing columns, indexes or tables is not available.
  • Database and table lists come from SHOW DATABASES and SHOW TABLES, so they only include what your account can see.
  • The inspector reads the definition each time it opens. It does not compare versions or show a schema diff.