DataGrip (JetBrains)

Works with PostgreSQL, MySQL, SQLite, SQL Server, Oracle, and 20+ other databases.

PostgreSQL MySQL SQLite SQL Server Oracle

Quick Export (Single Table)

  1. In the Database tool window, expand your data source and find the table.
  2. Right-click the table name → Copy DDLTo Clipboard.
  3. Paste directly into SchemaLens.

Full Schema Export (All Tables)

  1. In the Database tool window, right-click the database/schema name.
  2. Select SQL ScriptsCopy DDL to Clipboard (or Save to File).
  3. Choose the objects to include (tables, views, indexes, triggers).
  4. Paste the result into SchemaLens Schema A or Schema B.

Keyboard Shortcuts

Copy DDL for selected table Ctrl+Shift+C
Generate DDL data source Ctrl+Alt+G
Open Database tool window Alt+1
💡 Pro tip:

Use Compare With (Ctrl+D) on two DDL files inside DataGrip, then paste both into SchemaLens for a semantic diff that understands column renames and type changes.

DBeaver

Free universal database tool. Supports all major databases via JDBC.

PostgreSQL MySQL SQLite SQL Server Oracle

Single Table DDL

  1. In the Database Navigator, expand your connection → SchemasTables.
  2. Right-click the table → Generate SQLDDL.
  3. The DDL editor opens. Press Ctrl+A then Ctrl+C to copy.

Full Database Schema Export

  1. Right-click the database/schema in Database Navigator.
  2. Select Generate SQLDDL (or Tools → Export Data for a custom dump).
  3. Check Tables, Views, and Indexes in the object list.
  4. Click Generate, select all, and copy.

Keyboard Shortcuts

Generate SQL / DDL Ctrl+Shift+C
Export data Ctrl+Shift+E
Focus Database Navigator Alt+Shift+D
💡 Pro tip:

For PostgreSQL, use Tools → Backup with --schema-only to get a clean dump without data. Then paste the SQL into SchemaLens.

TablePlus

Modern, native database GUI for macOS, Windows, and Linux.

PostgreSQL MySQL SQLite SQL Server Oracle

Export Schema SQL

  1. Connect to your database and select it from the left sidebar.
  2. Go to FileExportSQL.
  3. In the export dialog, choose Structure only (uncheck Data).
  4. Select the tables you want to export (or Select All).
  5. Click Export and save the .sql file.
  6. Open the file, copy the contents, and paste into SchemaLens.

Copy Single Table DDL

  1. Right-click a table in the left sidebar → CopyCopy as SQLCreate Statement.
  2. Paste directly into SchemaLens.

Keyboard Shortcuts

Open Quick Launch Cmd+K / Ctrl+K
Copy table as CREATE Cmd+Shift+C / Ctrl+Shift+C
Export dialog Cmd+Shift+E / Ctrl+Shift+E
💡 Pro tip:

TablePlus remembers your last export settings. After the first export, press Cmd+Shift+E / Ctrl+Shift+E to instantly re-export with the same options — perfect for weekly schema snapshots.

pgAdmin

The official management tool for PostgreSQL.

PostgreSQL

Backup / Schema-Only Export

  1. In the Browser tree, right-click your database.
  2. Select Backup... from the context menu.
  3. In the Backup dialog, set Format to Plain.
  4. Under Dump OptionsType of Objects, check Only schema (uncheck Blobs, Pre-data, Data, Post-data if you only want CREATE TABLE).
  5. Set the Filename and click Backup.
  6. Open the saved file, copy the SQL, and paste into SchemaLens.

Copy Single Table DDL

  1. Expand SchemasTables in the Browser tree.
  2. Right-click the table → ScriptsCREATE Script.
  3. The script opens in the Query Editor. Copy and paste into SchemaLens.

Using psql (Command Line)

  1. Open a terminal and run:
    pg_dump --schema-only --no-owner --no-privileges mydb > schema.sql
  2. Copy the contents of schema.sql into SchemaLens.

Useful Commands

Schema-only dump pg_dump -s mydb
Specific tables only pg_dump -s -t users -t orders mydb
No owner/privileges pg_dump -s -O -x mydb
💡 Pro tip:

Use pg_dump --schema-only --no-owner --no-privileges for the cleanest output. SchemaLens works best when the SQL doesn't contain ownership or privilege statements that vary between environments.

MySQL Workbench

Official visual tool for MySQL database architects, developers, and DBAs.

MySQL MariaDB

Export Schema (Data Export)

  1. Go to ServerData Export.
  2. Select your schema from the left panel.
  3. Under Export Options, choose Dump Structure Only.
  4. Select the tables you want (or check the schema name to select all).
  5. Choose Export to Self-Contained File and set a path.
  6. Click Start Export.
  7. Open the SQL file, copy, and paste into SchemaLens.

Copy Single Table DDL

  1. In the Schema navigator, right-click the table.
  2. Select Copy to ClipboardCreate Statement.
  3. Paste directly into SchemaLens.

Using mysqldump (Command Line)

  1. Run:
    mysqldump --no-data --skip-comments mydb > schema.sql
  2. Copy the contents into SchemaLens.

Useful Commands

Structure only mysqldump --no-data mydb
Skip comments mysqldump --no-data --skip-comments mydb
Specific tables mysqldump --no-data mydb users orders
💡 Pro tip:

Add --skip-comments to remove auto-generated timestamps from the dump. This prevents SchemaLens from flagging comment differences as schema changes.

SQL Server Management Studio (SSMS)

Microsoft's integrated environment for managing SQL Server infrastructure.

SQL Server Azure SQL

Generate Scripts Wizard

  1. In Object Explorer, right-click your database.
  2. Select TasksGenerate Scripts....
  3. In the wizard, click Next to reach the Select Objects page.
  4. Choose Script entire database and all database objects (or select specific tables).
  5. Click Next → On the Set Scripting Options page, click Advanced.
  6. Set Types of data to scriptSchema only.
  7. Set Script DROP and CREATEScript CREATE (optional but cleaner).
  8. Choose Save to file or Save to new query window.
  9. Click NextFinish.
  10. Copy the SQL and paste into SchemaLens.

Quick Script Single Table

  1. In Object Explorer, expand Tables.
  2. Right-click the table → Script Table asCREATE ToNew Query Editor Window.
  3. Copy and paste into SchemaLens.

Useful Commands

Script table as CREATE Right-click → Script → CREATE To
Generate Scripts wizard Right-click DB → Tasks → Generate Scripts
💡 Pro tip:

In the Advanced scripting options, set Script Extended Properties to False and Script Logins to False for cleaner diffs that focus on schema changes, not environment metadata.

DB Browser for SQLite

High quality, visual, open source tool to create, design, and edit SQLite database files.

SQLite

Export Database to SQL

  1. Open your database file in DB Browser.
  2. Go to FileExportDatabase to SQL file....
  3. In the export dialog, check Structure only (uncheck Data).
  4. Select the tables you want to export (or leave all selected).
  5. Choose a save location and click Save.
  6. Open the exported .sql file, copy, and paste into SchemaLens.

Copy Single Table DDL

  1. Click the Database Structure tab.
  2. Right-click the table → Copy CREATE statement.
  3. Paste directly into SchemaLens.

Using sqlite3 (Command Line)

  1. Run:
    sqlite3 mydb.db ".schema" > schema.sql
  2. Copy the contents into SchemaLens.

Useful Commands

Dump all schema sqlite3 db ".schema"
Dump specific table sqlite3 db ".schema users"
Dump with indexes sqlite3 db ".schema" (includes indexes)
💡 Pro tip:

SQLite's .schema command includes CREATE INDEX statements. SchemaLens will diff both tables and indexes, giving you a complete picture of schema changes.

⚡ Command-Line Quick Reference

One-liners for every database. No GUI required.

PostgreSQL

Full schema pg_dump -s -O -x mydb > schema.sql
Specific tables pg_dump -s -t users -t orders mydb

MySQL / MariaDB

Full schema mysqldump --no-data --skip-comments mydb > schema.sql
Specific tables mysqldump --no-data mydb users orders

SQLite

Full schema sqlite3 mydb.db ".schema" > schema.sql
Specific table sqlite3 mydb.db ".schema users"

SQL Server

Full schema (sqlcmd) sqlcmd -S server -d mydb -Q "EXEC sp_helptext ..."
Generate Scripts wizard SSMS → Right-click DB → Tasks → Generate Scripts

Oracle

Full schema (Data Pump) expdp user/pass DIRECTORY=data_pump_dir DUMPFILE=schema.dmp CONTENT=METADATA_ONLY
DBMS_METADATA (PL/SQL) SELECT DBMS_METADATA.GET_DDL('TABLE','USERS') FROM DUAL;

Ready to diff your schema?

Paste your exported CREATE TABLE statements into SchemaLens and see changes instantly — with breaking-change detection and migration script generation.

Compare Schemas Free →