Skip to content
← SQL Tools
🔒 Runs in your browser 🚫 No data uploaded ✓ Free, no login

SQL Query Builders & Database Migration Tools

Generate production-ready SQL Server PIVOT and UNPIVOT queries, plus migrate databases between SQLite, Access, and SQL Server. Each tool handles the heavy lifting automatically — syntax, type mapping, relationship handling — so you can focus on the logic, not the boilerplate.

NEW
Visual Pivot Builder
Upload or paste your data, assign fields to rows, columns, and values, then instantly see a rendered pivot table AND the SQL script that reproduces it. Supports SQL Server, PostgreSQL, MySQL.
🔄
PIVOT Generator
Generate a static SQL Server PIVOT query. Enter your table, row field, column field, value field, aggregate, and pivot values.
Open tool →
Dynamic PIVOT Generator
Generate a dynamic PIVOT that discovers column values at runtime using dynamic SQL. No hardcoded value lists.
Open tool →
↩️
UNPIVOT Generator
Normalize a wide table with repeated column groups back into rows. Uses the native UNPIVOT operator or CROSS APPLY VALUES.
Open tool →
📦
SQLite to T-SQL Script Builder
Drop a .sqlite file and generate a complete T-SQL migration script package — schema, data, foreign keys, and validation.
Open tool →
NEW
Access to T-SQL Script Builder
Drop an .mdb or .accdb file and generate T-SQL migration scripts. Supports Jet 3, Jet 4, and ACE 12–16 — all Access versions.
Open tool →
NEW
SQLite to Access Converter
Drop a .sqlite file, pick your target Access version (Jet 4 through ACE 16), and download a complete PowerShell migration package with CSV data.
Open tool →
NEW
SQLite to Excel Converter
Drop a .sqlite file and export the entire database to Excel (.xlsx). Each table becomes a tab, with a schema overview on the first sheet. Large tables auto-split.
Open tool →
NEW
Excel → SQL INSERT Generator
Drop an .xlsx file and generate SQL INSERT statements with optional CREATE TABLE, type inference, and batching. Supports MySQL, PostgreSQL, SQL Server, and SQLite.
Open tool →

Static PIVOT vs Dynamic PIVOT — Which Do You Need?

 Static PIVOTDynamic PIVOT
Column valuesHardcoded in queryDiscovered at runtime
Handles new valuesNo — requires code changeYes — automatic
PerformanceSlightly fasterSlightly slower (builds SQL string)
ReadabilityClearer, easier to auditHarder to read
When to useKnown, fixed set of values (months, quarters)Unknown or changing values (product names, regions)
RiskNoneSQL injection risk if source is user input

When to Use UNPIVOT

UNPIVOT is the reverse of PIVOT: it takes columns and turns them into rows. This is useful when you have a wide table where repeated column groups should be normalized.

Example: a sales table with Jan_Sales, Feb_Sales, Mar_Sales columns. UNPIVOT turns each of those columns into a row with a Month column and a Sales value column — proper normalized form.

What This Tool Does

A collection of browser-based SQL query builders that generate complex SQL patterns — pivots, unpivots, date spines, deduplication queries, and data conversions — without requiring you to write the syntax from scratch.

Who This Is For

Example: Input: Describe your table structure: source table, row field, column field, and aggregate → Output: A complete, ready-to-run SQL query for your specified pattern and database dialect

Frequently Asked Questions

What is the difference between PIVOT and UNPIVOT?
PIVOT rotates rows into columns — it takes distinct values from one column and spreads them across the result as separate columns. UNPIVOT does the opposite: it takes multiple columns and stacks them into rows with a type column and a value column.
Does SQL Server support PIVOT natively?
Yes. SQL Server has supported the native PIVOT and UNPIVOT operators since SQL Server 2005. These are SQL Server-specific extensions to standard SQL.
Why does static PIVOT require hardcoded values?
The SQL Server query optimizer needs to know the output column names at compile time for a static PIVOT. Those column names come from the pivot values list. Dynamic PIVOT works around this by building the SQL string at runtime using EXEC or sp_executesql.
Can I use these builders for Azure SQL Database?
Yes. Azure SQL Database uses the same T-SQL engine as SQL Server and supports all PIVOT, UNPIVOT, and dynamic SQL patterns generated by these tools.

Related SQL Tools