CONTAINS

The CONTAINS scalar function searches for text in a text document indexed by Net Search Extender. It returns the INTEGER value 1 if the document contains the text, or any relation specified in the search argument. Otherwise, it returns 0.

Function syntax

Read syntax diagramSkip visual syntax diagram>>-CONTAINS--(--column-name--,--search-argument--)-------------><

Function parameters

column name
The name of a column. The column must have an associated text index. You can create text indexes by using the administration command DB2TEXT CREATE INDEX.
search-argument
A string of type VARCHAR containing the terms to be searched. See Syntax of search arguments.
Note

You cannot use the CONTAINS query on a text index created on a view.