SwapSQL

PostgreSQL → MySQL

Convert PostgreSQL arrays to MySQL

MySQL has no array types. The faithful, queryable mapping is a JSON array — '{a,b}' becomes ["a","b"] and MySQL's JSON functions take over.

text[] / integer[] JSON

What to know

Before / after

PostgreSQL

SELECT * FROM accounts WHERE 'vip' = ANY(tags);

MySQL

SELECT * FROM accounts WHERE JSON_CONTAINS(tags, '"vip"');

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.