Book Contents

Book Index

Next Topic

Home

POSITION

POSITION returns an INTEGER values representing the location of a specified substring with a string (counting from one).

Syntax

POSITION ( substring IN string )

Semantics

 

substring

(CHAR or VARCHAR) is the substring to locate

string

(CHAR or VARCHAR) is the string in which to locate the substring

Notes

POSITION is identical to STRPOS except for the order of the arguments.

Examples

=> SELECT POSITION('3' IN '1234');

position

----------

3

(1 row)