position()

Returns location of first occurrence of needle in haystack, counting from 1. Returns 0 if no match found

Alias of instr()

Arguments & returns

position(haystack, needle)

Scalar
Overload link haystackneedle Returns
#01 VARCHARVARCHAR BIGINT

Example

position example
SQL
Haybarn WASM 1.5.5-rc3 · In your browser

Engine example · Run to view results.

Catalog examples

SELECT
  instr('test test', 'es');