Skip to content

Commit

Permalink
Fix typo in example
Browse files Browse the repository at this point in the history
  • Loading branch information
yen223 committed Nov 14, 2024
1 parent fe135f4 commit 0307efa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions articles/20241114-til-counting-nulls-in-postgres.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ This is useful in a check constraint, if you need to ensure that exactly some nu
```sql
CREATE TABLE purchase_order (
id UUID PRIMARY KEY,
contact_email TEXT NULLABLE,
contact_phone TEXT NULLABLE
contact_email TEXT NULL,
contact_phone TEXT NULL
);

-- If we want to ensure that at least one of email or phone is provided
Expand All @@ -40,4 +40,4 @@ ALTER TABLE purchase_order ADD CONSTRAINT contact_info_check CHECK (
);
```

`num_nonnulls` and `num_nulls` are available in Postgres 9.6+ ([docs](https://www.postgresql.org/docs/9.6/functions-comparison.html#:~:text=Table%209%2D3.%20Comparison%20Functions))
`num_nonnulls` and `num_nulls` are available in Postgres 9.6+ ([docs](https://www.postgresql.org/docs/9.6/functions-comparison.html#:~:text=Table%209%2D3.%20Comparison%20Functions))

0 comments on commit 0307efa

Please sign in to comment.