description |
---|
Returns the position of the first occurrence of a string when it is contained in another string. If no such occurrence is found, a zero is returned. The comparison is case-sensitive. |
- expression1: The input expression to search.
- expression2: The string to search for in the specified expression.
Examples
{% code title="INSTR example" %}
SELECT INSTR('SPICE', 'S')
-- EXPR$0
-- 1
{% endcode %}
{% code title="INSTR example" %}
SELECT INSTR('SPICE', 'd')
-- EXPR$0
-- 0
{% endcode %}