Oracle FIND_IN_SET: Syntax, Usage & Examples

The FIND_IN_SET function is used to search for a specified value in a comma-separated string list and return its position in the list. Its syntax is as follows:

FIND_IN_SET(value, string_list)
  1. The value is the value to be searched for.
  2. The string_list is a list of strings separated by commas.

The FIND_IN_SET function will return the position of a value in a list of strings, or 0 if it is not found. For example, FIND_IN_SET(‘apple’, ‘banana,apple,orange’) will return 2, because ‘apple’ is in the second position in the list.

bannerAds