Skip to Content

mvSQL Database Function - POSITION()

Summary

Returns the position of a substring within a string, with 1 being the leftmost character in the main string.

Syntax

POSITION(<substring>, <string>)

Parameters

substring

The substring to find.

string

The string to search through.

Returns

The position of a substring within a string, with 1 being the leftmost character in the main string. Returns 0 if the search string is not found.

Examples

POSITION('lo', 'HelloWorld')

Returns

4