mirror of
https://github.com/jbranchaud/til
synced 2026-01-04 23:58:01 +00:00
Add a bit more to the latest TIL
This commit is contained in:
@@ -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 |
|
||||
+---------------+
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user