instr
function
Applies to: Databricks SQL Databricks Runtime
Returns the (1-based) index of the first occurrence of substr
in str
.
Returns
A BIGINT.
If substr
cannot be found the function returns 0.
Examples
> SELECT instr('SparkSQL', 'SQL');
6
> SELECT instr('SparkSQL', 'R');
0