Skip to content
Very straight-forward script for formatting SQL statement.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
images
lib
.gitignore
LICENSE
README.md
index.php
octocat.tmpl

README.md

Banner

SQL Formatter

Very straight-forward script for formatting SQL statement.

Format string like, f.i.,

SELECT LAT_N, CITY, TEMP_F FROM STATS, STATION WHERE MONTH = 7 AND STATS.ID = STATION.ID ORDER BY TEMP_F

into

SELECT
    LAT_N,
    CITY,
    TEMP_F
FROM
    STATS,
    STATION
WHERE
    MONTH = 7
    AND STATS.ID = STATION.ID
ORDER BY
    TEMP_F

How to use

Just copy/paste your SQL statement into the text box as illustrated here below and click on the Format button.

sql_formatter

Source

The SqlFormatter has been written by Jeremy Dorn and available on GitHub: https://github.com/jdorn/sql-formatter.

You can’t perform that action at this time.