Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 9 days 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 (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-25T19:29:14.000Z (over 1 year ago)
- Last Synced: 2024-11-28T23:34:02.202Z (14 days 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
![php 8.2](https://img.shields.io/badge/php-8.2-brightgreen?style=flat)
![Banner](./banner.svg)
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.
![sql_formatter](images/demo.gif)
## Source
The `SqlFormatter` has been written by `Jeremy Dorn` and available on GitHub: https://github.com/jdorn/sql-formatter.