SQL
Formatters
Integers:  
```sql
SELECT format('{:,}',  123_456_789); -- 123,456,789
SELECT format('{:t.}', 123_456_789); -- 123.456.789
SELECT format('{:''}', 123_456_789); -- 123'456'789
SELECT format('{:_}',  123_456_789); -- 123_456_789
SELECT format('{:t }', 123_456_789); -- 123 456 789
SELECT format('{:tX}', 123_456_789); -- 123X456X789
```  
Float, double and decimal:  
```sql
SELECT format('{:,f}',    123456.789); -- 123,456.78900
SELECT format('{:,.2f}',  123456.789); -- 123,456.79
SELECT format('{:t..2f}', 123456.789); -- 123.456,79
```  
#### `printf` Syntax {#docs:sql:functions:char::printf-syntax}  
The `printf(format, parameters...)` function formats strings using the [`printf` syntax](https://cplusplus.com/reference/cstdio/printf/).  
Format without additional parameters:  
```sql
SELECT printf('Hello world');
```  
```text
Hello world
```  
Format a string using arguments in a given order:  
```sql
SELECT printf('The answer to %s is %d', 'life', 42);
```  
```text
The answer to life is 42
```  
Format a string using positional arguments `%position$formatter`, e.g., the second parameter as a string is encoded as `%2$s`:  
```sql
SELECT printf('I''d rather be %2$s than %1$s.', 'right', 'happy');
```  
```text
I'd rather be happy than right.
```