Searching on more then one column

In cases where you need to create an text index on more then one column, the easiest way is to use the SQL scalar function and combine the searches on those columns. You can see this in the following example:

SELECT AUTHOR,TITLE 
        FROM DB2EXT.TEXTTAB 
        WHERE CONTAINS(COMMENT,
        '"book"')=1 and CONTAINS(AUTHOR,'"Mike"')=1

For a table-valued function it is more difficult, as you may need to use a union for performance reasons. Another possibility with the table-valued function is to use a view and combine your table columns in a view column to create a text index. In this way, you avoid having two separate text search calls.

Combining your text columns may provide an improvement in performance. However, this strongly depends on your individual search requirements.