From d1c856a7d5303773adf66468f51529a7ded786a1 Mon Sep 17 00:00:00 2001 From: Simon Holywell Date: Tue, 27 Feb 2024 11:11:40 +1000 Subject: [PATCH] fix: document join exception (fixes #81) --- _includes/sqlstyle.guide.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/_includes/sqlstyle.guide.md b/_includes/sqlstyle.guide.md index bc0d7d1..4caadbf 100644 --- a/_includes/sqlstyle.guide.md +++ b/_includes/sqlstyle.guide.md @@ -269,6 +269,16 @@ SELECT r.last_name AND c.chief = 'Y'; ``` +The exception to this is when using just the `JOIN` keyword where it should be +before the river. + +```sql +SELECT r.last_name + FROM riders AS r + JOIN bikes AS b + ON r.bike_vin_num = b.vin_num +``` + #### Subqueries Subqueries should also be aligned to the right side of the river and then laid