initcap function

Applies to: check marked yes Databricks SQL check marked yes Databricks Runtime

Returns expr with the first letter of each word in uppercase.

Syntax

initcap(expr)

Arguments

  • expr: A STRING expression.

Returns

A STRING.

All other letters are in lowercase. Words are delimited by white space.

Examples

> SELECT initcap('sPark sql');
 Spark Sql