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
|
||||
```
|
||||
|
||||
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
|
||||
SELECT CASE
|
||||
|
@ -338,7 +338,9 @@ SELECT CASE
|
|||
THEN 'x more than y and more than z'
|
||||
ELSE
|
||||
'x and y not related'
|
||||
END AS city
|
||||
END AS city,
|
||||
street_address,
|
||||
phone_number
|
||||
FROM office_locations
|
||||
```
|
||||
|
||||
|
@ -350,7 +352,9 @@ SELECT CASE postcode
|
|||
THEN 'Brighton'
|
||||
WHEN 'EH1'
|
||||
THEN 'Edinburgh'
|
||||
END AS city
|
||||
END AS city,
|
||||
street_address,
|
||||
phone_number
|
||||
FROM office_locations
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in a new issue