The SQL table-valued function is a compromise between the SQL scalar search functions and the stored procedure search. With the SQL table-valued function you can also use a db2ext.highlight function to get information about why a document qualified as a search result.
The main functional differences to the stored procedure search are:
The main functional difference to the SQL scalar search functions is:
Use the SQL table-valued function in those cases where you would normally use an SQL scalar function, but you want to exploit text indexes on views.