Skip to content

포매터 및 코드

PostgreSQL → MySQL 변환기

Translate Postgres DDL into MySQL-compatible SQL.

Runs in your browser
MySQL-compatible
CREATE TABLE users (
  id BIGINT AUTO_INCREMENT PRIMARY KEY,
  email TEXT UNIQUE,
  data JSON,
  created_at TIMESTAMP DEFAULT NOW()
);

INSERT INTO users (email) VALUES ('[email protected]')
;

Manual review notes

  • MySQL TIMESTAMP is UTC; ensure server tz.
  • MySQL has no RETURNING; use SELECT LAST_INSERT_ID().

편집자 노트

Understanding · Two SQLs that look the same — until they don't.

이 심층 챕터는 현재 영어로만 제공됩니다. 위의 변환 도구는 귀하의 언어로 작동하지만, 긴 설명 글은 아직 번역되지 않았습니다.

자주 묻는 질문

Quick answers.

How are PostgreSQL data types handled?

Data types like `TEXT` and `BOOLEAN` are mapped to their MySQL equivalents, such as `LONGTEXT` or `TINYINT(1)`. Specific Postgres types like `UUID` are converted to compatible string formats.

Does this tool support data migration?

No. This tool is designed specifically for DDL statements (schema definitions) rather than SQL `INSERT` data or binary row migration.

What happens to Postgres sequences?

Postgres `SERIAL` or `BIGSERIAL` columns are converted to the MySQL `AUTO_INCREMENT` attribute on the primary key. Individual sequence objects are generally omitted as MySQL manages incrementing at the table level.

Is my schema sent to a server?

No. The translation logic is executed entirely in your browser. Your database structure remains private and is never transmitted over the network.

사람들이 다음도 검색합니다.

관련 도구

More in this room.

모두 보기 포매터 및 코드