mirror of
https://github.com/treffynnon/sqlstyle.guide.git
synced 2025-03-09 12:49:51 -05:00
Update sqlstyle.guide.md
This commit is contained in:
parent
71671dcada
commit
12a416ee46
1 changed files with 4 additions and 4 deletions
|
@ -180,9 +180,9 @@ Always include newlines/vertical space:
|
||||||
* to separate code into related sections, which helps to ease the readability of
|
* to separate code into related sections, which helps to ease the readability of
|
||||||
large chunks of code.
|
large chunks of code.
|
||||||
|
|
||||||
Keeping all the keywords aligned to the righthand side and the values left aligned
|
Keeping all the dependent keywords (e.g. `ON` depends on `JOIN`, `AND` depends on `WHERE`,
|
||||||
creates a uniform gap down the middle of query. It makes it much easier to scan
|
`SET` depends on `UPDATE` right aligned with the top level keywords helps make it clear
|
||||||
the query definition over quickly too.
|
all the lines are part of the same clause.
|
||||||
|
|
||||||
```sql
|
```sql
|
||||||
INSERT INTO albums (title, release_date, recording_date)
|
INSERT INTO albums (title, release_date, recording_date)
|
||||||
|
@ -193,7 +193,7 @@ VALUES ('Charcoal Lane', '1990-01-01 01:01:01.00000', '1990-01-01 01:01:01.00000
|
||||||
```sql
|
```sql
|
||||||
UPDATE albums
|
UPDATE albums
|
||||||
SET release_date = '1990-01-01 01:01:01.00000'
|
SET release_date = '1990-01-01 01:01:01.00000'
|
||||||
WHERE title = 'The New Danger';
|
WHERE title = 'The New Danger';
|
||||||
```
|
```
|
||||||
|
|
||||||
```sql
|
```sql
|
||||||
|
|
Loading…
Reference in a new issue