FORMAT(...)
All functions > STRING > FORMAT(...)
C-style string formatting: a VARCHAR template plus one scalar per placeholder.
Signatures
Returns: Formatted string
FORMAT_FN(format: VARCHAR, values: scalars…) → VARCHAR sql
| Parameter | Type | Required | Description |
|---|---|---|---|
format | VARCHAR | Yes | Format string with C-style placeholders |
values | scalars… | Yes | One expression per placeholder, in order |
Notes
- Variadic
FORMAT(...)/PRINTF(...)bundles trailing arguments like variadicCONCAT_WS(sep, ...) NULLin a value position typically makes the whole result NULL; useCOALESCEfor sentinels
Related operators
Examples
FORMAT_FN(...)
FeatureQL
SELECT
f1 := FORMAT_FN('n=%s', ARRAY['7']) -- Array form with one value
;Result
| f1 VARCHAR |
|---|
| n=7 |