[ Web Proxy ]
URL:
Viewing: https://sql-splitter.dev/reference/dialects [Back]  [Original]

SQL Dialects | sql-splitterSkip to content
CtrlK
Cancel

SQL Dialects

sql-splitter supports four SQL dialects.

Source: mysqldump

Detection signals:

  • MySQL dump / MariaDB dump header comment
  • Conditional comments (/*!40..., /*!50...)
  • LOCK TABLES
  • Backtick quoting (`table`)

Features supported:

  • CREATE TABLE with inline keys
  • INSERT INTO (single and multi-row)
  • CREATE INDEX
  • ALTER TABLE
  • Session commands (SET, USE) are recognized but carry no table, so split does not write them to any output file

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 scores dialect markers in the first 8 KB of the file. Ambiguous files default to MySQL. Override with --dialect:

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

Detection can guess wrong when marker-like text appears in data or comments early in the file see Known Limitations for the failure modes, plus what each dialect parser does not handle (stored procedures, binary formats, and more).


Web Proxy Viewer  |  New URL  |  Original Page