Skip to content

Scalar functions ​

Scalar functions evaluate expressions and return one value per input row. They transform text, numbers, dates, structured values and other SQL data.

Calling a function ​

text
function_name(argument, ...)

Function names ignore ASCII case. Use the documented spelling, including underscores. Accepted argument counts, conversion rules and NULL behavior are stated for each function; similar names in another database do not imply identical overloads.

sql
SELECT lower('HELLO'), abs(-7), coalesce(NULL, 'fallback')
FORMAT csv;
text
"hello",7,"fallback"

Unlike scalar functions, aggregates combine rows, table functions provide rows in FROM, and window functions read related rows while retaining each input row.

Function families ​