SQL input
Minified SQL
Removes every comment and all redundant whitespace — inside PL/pgSQL function bodies too — without changing what the SQL does. Strings and quoted identifiers are kept byte for byte. Everything runs in your browser; nothing is uploaded.
-- comments, # comments (MySQL), /* … */ comments, optimizer hints /*+ … */ (a hint changes a plan, never a result), indentation and line breaks — and all of the above inside a DO block or a function / procedure body whose LANGUAGE is plpgsql or sql.'…', "…" and `…`; a dollar-quoted string that is a value, or a body in any other language (plpython3u, where indentation is syntax; plv8); a space wherever removing it would fuse two tokens (DATE '…', a - -1)./*!40101 … */, under the MySQL dialect only. MySQL runs its contents, and mysqldump wraps whole triggers, views and charset settings in them — stripping them would silently drop those on restore. The status line counts every one that was kept.# comments, -- only when followed by a space, no nested block comments. DELIMITER lines are kept whole so a mysqldump with triggers or routines still loads.E'…' (standard_conforming_strings = on, the default since 9.1). Two string constants on separate lines keep their line break, because that is what concatenates them.LANGUAGE plpythonu) are left untouched."…" is a string in MySQL, an identifier in PostgreSQL). Only the result is coloured — the editor stays a plain text area. Above 200 kB of output the colouring is skipped (one DOM node per token) and the status line says so.\d or mysql \G; they are not SQL. An unterminated string or comment is reported with its line and column rather than guessed at — it usually means the other dialect was meant.