Skip to content

SQL Dialects

sql-splitter supports four SQL dialects.

Source: mysqldump

Detection signals:

  • AUTO_INCREMENT
  • Backtick quoting (`table`)
  • SET @variable
  • ENGINE=InnoDB

Features supported:

  • CREATE TABLE with inline keys
  • INSERT INTO (single and multi-row)
  • CREATE INDEX
  • ALTER TABLE
  • Session commands (SET, USE)

Example:

CREATE TABLE `users` (
`id` INT AUTO_INCREMENT PRIMARY KEY,
`name` VARCHAR(100) NOT NULL,
`email` VARCHAR(255),
INDEX `idx_email` (`email`)
) ENGINE=InnoDB;
INSERT INTO `users` VALUES (1, 'Alice', 'alice@example.com');

sql-splitter analyzes the first ~1000 lines to detect the dialect. Override with --dialect:

Terminal window
sql-splitter split dump.sql --dialect=postgres
sql-splitter convert dump.sql --from mysql --to postgres