mirror of
https://github.com/treffynnon/sqlstyle.guide.git
synced 2025-03-09 12:49:51 -05:00
Indentation of END
This commit is contained in:
parent
7fea75749c
commit
7b2a5fba55
1 changed files with 8 additions and 4 deletions
|
@ -328,7 +328,7 @@ SELECT CASE WHEN x > y THEN 1 ELSE 0 END
|
||||||
FROM table
|
FROM table
|
||||||
```
|
```
|
||||||
|
|
||||||
Or should have the same left justification, and `WHEN`/`THEN` should be indented the same as the `ELSE`/`value`.
|
Or WHEN/END should have 2 space left justification, and `WHEN`/`THEN` should be indented the same as the `ELSE`/`value`.
|
||||||
|
|
||||||
```sql
|
```sql
|
||||||
SELECT CASE
|
SELECT CASE
|
||||||
|
@ -338,7 +338,9 @@ SELECT CASE
|
||||||
THEN 'x more than y and more than z'
|
THEN 'x more than y and more than z'
|
||||||
ELSE
|
ELSE
|
||||||
'x and y not related'
|
'x and y not related'
|
||||||
END AS city
|
END AS city,
|
||||||
|
street_address,
|
||||||
|
phone_number
|
||||||
FROM office_locations
|
FROM office_locations
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -350,7 +352,9 @@ SELECT CASE postcode
|
||||||
THEN 'Brighton'
|
THEN 'Brighton'
|
||||||
WHEN 'EH1'
|
WHEN 'EH1'
|
||||||
THEN 'Edinburgh'
|
THEN 'Edinburgh'
|
||||||
END AS city
|
END AS city,
|
||||||
|
street_address,
|
||||||
|
phone_number
|
||||||
FROM office_locations
|
FROM office_locations
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue