What Is SQL Table Schema Comparator?
SQL Table Schema Comparator is a free online tool by TechnSols that compares two SQL schemas and lists what changed between them: added tables, removed tables, and changed tables with their added columns, removed columns, and type changes. Paste the old DDL and the new DDL, and the tool writes a plain text diff report you can read, copy, or download.
Databases change constantly. A developer adds a column, renames a field, or widens a type, and the change has to reach every environment that holds the same schema. Comparing two schemas by eye means reading hundreds of lines of CREATE TABLE statements and spotting the one line that differs. This tool does that reading for you, table by table and column by column, in seconds. It is a text parser, not a database client: it reads the DDL you paste and never connects to a live database. When the schema needs a picture instead of a list, the Schema Visualizer draws the tables and their columns as a diagram.
Both schemas are treated the same way. MySQL, PostgreSQL, and SQLite CREATE TABLE statements are all read, and table and column names match without regard to case, so Customers and customers count as the same table. Types are compared as written, ignoring only case and extra spaces, so VARCHAR(100) and TEXT count as different types.
How To Use SQL Table Schema Comparator?
Using SQL Table Schema Comparator takes less than a minute, with no software to install and no account to make. Get both versions of the schema, paste them in, and read the report.
Step 1: Paste Schema A, The Old Schema
Paste the first schema into the Schema A box, or choose a .sql file for it. Schema A is usually the version that exists now: the production schema, the staging schema, or the schema from last release. It must hold at least one CREATE TABLE statement. A file of up to 100 MB is accepted, and pasted text of up to 5 MB is accepted.
Step 2: Paste Schema B, The New Schema
Paste the second schema into the Schema B box, or choose a .sql file for it. Schema B is usually the version you want: the new migration, the development schema, or the schema from the next release. If either box holds no CREATE TABLE statement, the tool refuses it with a plain message and tells you which side is the problem. When the queries behind the schema need checking too, the Explain Plan Viewer shows how a query will run.
Step 3: Compare The Schemas And Download The Report
Press Compare Schemas and read the report in the output box. The summary line counts the added, removed, changed, and unchanged tables, and the lines below name every change. Copy the report with the Copy button, or download it as schema-diff.txt with the Download button in the result list. Test any query against the new schema in the SQL Query Playground before you deploy.
Changing either schema clears the old report at once, so a stale diff is never shown. Press Compare Schemas again after each change to build a fresh report.
Why Compare Two SQL Schemas?
A schema is a contract. Every application that reads the database expects certain tables, certain columns, and certain types, and any change to that contract can break code that worked yesterday. A column that disappears breaks every query that reads it. A type that narrows from TEXT to VARCHAR(50) rejects rows that used to fit. A new NOT NULL column breaks every INSERT that does not supply it. The diff report lists each of these before the change is applied. The pg_dump page shows how to pull a schema-only dump from PostgreSQL, which is the usual way to get Schema A.
Catch A Missing Column Before Release
Releases fail on small differences. A migration runs on staging, a column is added by hand on production, and the two databases drift apart until one deploy fails with a missing column error. Comparing the two schemas before release turns that failure into a line in a report.
Prove Two Environments Match
Development, staging, and production should hold the same schema, but hand applied fixes and forgotten migrations pull them apart over time. A regular comparison proves they still match, or names exactly where they differ. That proof matters most before a big deploy and after any manual fix on one environment. When the data itself must move into a matching store, the CSV to SQLite converter builds a database file from a CSV export.
What Can You Do With SQL Table Schema Comparator?
SQL Table Schema Comparator fits any job where two versions of a schema must be checked against each other. These are the jobs it handles best.
Check A Migration Before It Runs
A migration script is a promise about what the schema will look like after it runs. Paste the current schema as A and the schema the migration should produce as B, and the report shows whether the promise holds. An added column that should be there, a dropped column that should not be, and a type change that was never planned all show up as lines in the report. When the migration also loads rows, the JSON to SQL converter turns the seed data into INSERT statements.
Compare Staging Against Production
Staging should mirror production, but a fix applied by hand on production never reaches staging, and a test migration on staging never reaches production. Paste a dump of each side and compare them. The report names the tables that exist on one side only and the columns that differ, so the environments can be brought back in line with a short list of changes instead of a guess.
Review A Teammate’s Schema Change
Code review covers application code, but schema changes often arrive as a dump file with no summary. Comparing the old and new schemas gives the reviewer a short list of what actually changed: this table added, that column widened, this key changed. Reviewing the list takes minutes, while reading two full dumps takes far longer and still misses the small change. When the review needs the data as well, the SQLite to CSV converter exports the rows for a look.
What The Comparator Checks
The report covers tables, columns, column types, NOT NULL flags, and primary keys. That scope is deliberate: it is the part of a schema that breaks applications when it changes. Indexes, foreign keys, defaults, views, and triggers are ignored, because they do not change which columns an application can read or write. The mysqldump page shows how to pull a schema-only dump from MySQL with the no-data option.
- Added tables: tables present in Schema B but missing from Schema A.
- Removed tables: tables present in Schema A but missing from Schema B.
- Changed tables: tables present in both, with column or key differences.
- Added columns: columns present in Schema B but missing from Schema A.
- Removed columns: columns present in Schema A but missing from Schema B.
- Type changes: a column whose type differs between the two schemas.
- Nullability changes: a column that gained or lost its NOT NULL flag.
- Primary key changes: a table whose primary key columns differ.
How A Renamed Column Is Reported
The tool matches columns by name, so a renamed column shows as two lines: one removed column with the old name and one added column with the new name. That is honest, because a rename in a database really is a drop plus an add, and every query using the old name breaks either way. If the rename was planned, the two lines are expected. If it was not planned, the two lines are the warning.
What The Report Leaves Out. The report never claims a schema is safe to apply. A type change from INTEGER to TEXT may be safe, or it may break every query that does arithmetic on the column. A dropped table may be unused, or it may hold the only copy of the data. The report lists the changes; judging them still needs a person who knows the application.
How SQL Table Schema Comparator Works
The tool strips comments from both schemas, then finds every CREATE TABLE statement and reads its column list. Each column gives its name, its type as written, whether it is NOT NULL, and whether it is part of the primary key, from an inline PRIMARY KEY or from a table level PRIMARY KEY clause. MySQL backticks, PostgreSQL double quotes, and SQLite brackets around names are all stripped before matching, so the same table written in two flavours still matches. When the whole database must move rather than just be compared, the SQL Dump converter loads a full dump into SQLite.
Comparison runs in three passes. First, tables are matched by name without regard to case, giving the added, removed, and shared tables. Second, each shared table has its columns matched the same way, giving the added and removed columns. Third, each shared column is checked for a type change, a nullability change, and a primary key change. The report is plain text, built from those three passes, so nothing in the DDL can run as code. If the comparison shows the schemas match, the report says so plainly. When the schema needs fresh rows for testing, the Seed Data Generator builds sample data for the tables.
Two honest limits are worth knowing. First, the tool compares DDL text only and never connects to a live database, so it cannot see indexes, data, or permissions that live outside the pasted text. Second, types are compared as written, so INT and INTEGER count as different types even though some databases treat them the same.
Privacy
Everything you compare stays in your browser. SQL Table Schema Comparator runs on your own computer, and nothing you paste or upload is sent to a server, stored, or shared with anyone.
Because no account is needed, there is no name, email, or history tied to what you do. Closing the tab ends the session, and the browser clears the schemas from memory.
Tips
A few habits make SQL Table Schema Comparator work smoother.
- Always dump schemas with the schema-only option, so data rows never enter the comparison.
- Put the older schema in A and the newer schema in B, so added and removed read the right way round.
- Compare before every release, not only when something breaks.
- Download the report and keep it with the release notes as a record.
- Test every migration on a copy of the database before you run it live.
When the report shows no differences, the schemas match and the deploy can go ahead. If it shows changes, read each line before you run the migration, and keep the report with the release. When the queries that use the schema need a home, the Query Library Manager keeps saved queries organised.
More Tools For The Same Job
These tools handle the same kinds of jobs: database schemas, SQL scripts, and table data.
- Database Schema Visualizer: draws tables and columns as a diagram.
- SQL Query Playground: runs SQL queries against a database in the browser.
- SQL Explain Plan Viewer: shows how a query will run before you run it.
- CSV to SQLite Converter: builds a real SQLite database file from a CSV file.
- SQL Dump to SQLite Converter: loads a SQL dump into a SQLite database.
- JSON to SQL INSERT Converter: turns JSON objects into SQL INSERT statements.
- SQLite to SQL Dump Converter: turns a SQLite database back into SQL text.
- Database Seed Data Generator: builds sample rows for a test database.
- SQL Query Library Manager: keeps saved SQL queries organised in one place.
- SQLite to CSV Converter: turns SQLite tables back into a CSV file.
FAQ
Common questions about comparing SQL schemas, answered plainly.
Is SQL Table Schema Comparator By TechnSols Free?
Yes, SQL Table Schema Comparator by TechnSols is completely free to use, with no account, no sign-up, and no usage limit. You can compare as many schemas as you like, and everything runs in your browser, so nothing is uploaded or stored anywhere.
Does The Tool Connect To My Database?
No, the tool never connects to a database. It reads only the DDL text you paste or the .sql files you choose, and the comparison happens in your browser. Your connection strings, passwords, and live data are never involved, and nothing leaves your computer at all.
What Happens When A Column Is Renamed?
A renamed column shows as one removed column with the old name and one added column with the new name, because the tool matches columns by name. That is honest, since a rename in a database really is a drop plus an add, and every query using the old name breaks either way.
Which Database Flavours Are Supported?
MySQL, PostgreSQL, and SQLite CREATE TABLE statements are all read, including backticks, double quotes, and square brackets around names. Types are compared as written, ignoring only case and extra spaces, so INT and INTEGER count as different types. Always test the migration on a copy first.
Does The Tool Write The Migration SQL?
No, the tool writes a diff report, not a migration script. It lists the added, removed, and changed tables and columns so you can write the ALTER TABLE statements yourself. Download the report as schema-diff.txt and keep it with the release notes.
Paste both schemas, read the report, and fix the differences before they reach production. A schema that matches on both sides is a deploy that holds together, and that is the whole point of the tool.