description |
---|
Returns the portion of the string from the specified base expression starting at the specified characters. |
- string_expression: Base expression to extract substring from.
- offset: The offset from which the substring starts.
Examples
{% code title="SUBSTRING example" %}
SELECT SUBSTRING('spice user 1 2 3', 12)
-- 1 2 3
{% endcode %}
- string_expression: Base expression to extract substring from.
- offset: The offset from which the substring starts.
- length: The length limit of the substring.
Examples
{% code title="SUBSTRING example" %}
SELECT SUBSTRING('base expression', 6, 4)
-- expr
{% endcode %}
- string_expression: Base expression to extract substring from.
- pattern: The offset from which the substring starts.
Examples
{% code title="SUBSTRING example" %}
SELECT SUBSTRING('spice user 123', '[0-9]+')
-- 123
{% endcode %}