https://github.com/cavo789/sql_formatter
Very straight-forward script for formatting SQL statement.
https://github.com/cavo789/sql_formatter
php sql sql-formatter
Last synced: 4 months ago
JSON representation
Very straight-forward script for formatting SQL statement.
- Host: GitHub
- URL: https://github.com/cavo789/sql_formatter
- Owner: cavo789
- License: mit
- Archived: true
- Created: 2018-10-09T20:41:37.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-25T19:29:14.000Z (about 2 years ago)
- Last Synced: 2024-11-28T23:34:02.202Z (5 months ago)
- Topics: php, sql, sql-formatter
- Language: PHP
- Homepage: https://sql-formatter.avonture.be/
- Size: 204 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - cavo789/sql_formatter - Very straight-forward script for formatting SQL statement. (PHP)
README
# SQL Formatter


Very straight-forward script for formatting SQL statement.
Format string like, f.i.,
```sql
SELECT LAT_N, CITY, TEMP_F FROM STATS, STATION WHERE MONTH = 7 AND STATS.ID = STATION.ID ORDER BY TEMP_F
```into
```sql
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.

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