SwapSQL

PostgreSQL → MySQL

Convert PostgreSQL numeric to MySQL DECIMAL

Exact decimals map cleanly — with one caveat: MySQL caps precision at 65 digits and scale at 30, while PostgreSQL allows far more (and even unconstrained numeric).

numeric(p,s) DECIMAL(p,s)

What to know

Before / after

PostgreSQL

balance numeric(12,2) DEFAULT 0

MySQL

balance DECIMAL(12,2) DEFAULT 0

Don't convert column-by-column — convert the whole database.

Upload a dump, get back ready-to-import SQL with this mapping (and every other one) applied.

Open the PostgreSQL → MySQL converter

See the full type mapping table or all guides.