diff --git a/postgres/concatenate-strings-with-a-separator.md b/postgres/concatenate-strings-with-a-separator.md index 0817c75..b880149 100644 --- a/postgres/concatenate-strings-with-a-separator.md +++ b/postgres/concatenate-strings-with-a-separator.md @@ -39,3 +39,15 @@ create table folders ( The first argument to `concat_ws` is the separator I want to use. The remaining arguments are the strings that should be concatenated with that separator. + +One other things that is nice about `concat_ws` is that it will ignore `null` +values that it receives. + +```sql +> select concat_ws(':', 'one', 'two', null, 'three'); ++---------------+ +| concat_ws | +|---------------| +| one:two:three | ++---------------+ +```