position returns the one-based index for the first occurrence of element within an array or string, beginning from offset start_index and iterating with step. If the second argument is a string, the first argument must be a string with a single character. If the second argument is an array of any, then depending of type of it's elements same type is expected as the first argument.
An integer index in array starting from 1; if not found returns zero.
SQL> select position ('b', 'Abacus'); callret VARCHAR _______________________________________________________________________________ 2 1 Rows. -- 3 msec. SQL> select position (2, vector ('Primero', null, 2, 3.333)); callret VARCHAR _______________________________________________________________________________ 3 1 Rows. -- 4 msec. SQL> select position ('a', 'babaab', 1, 2); ^--- matches 5-th as other 'a' are skipped as step is 2 chars callret INTEGER _______________________________________________________________________________ 5 1 Rows. -- 4 msec.