You can use the SQL table-valued function on the text indexes created in the previous examples.
The SQL table-valued function query corresponds to the previously used CONTAINS query. See "Synchronizing the text index" on page *** for information.
db2 "SELECT author, story FROM books b, table (db2ext.textsearch ('\"cat\"','DB2EXT','MYTEXTINDEX', 0, 2, CAST (NULL AS VARCHAR(18)))) T where T.primKey = b.isbn
For more details, see Using an SQL table-valued function for searching.
Note |
---|
The CAST (NULL AS VARCHAR(18)) calls the corresponding table-valued function to the primary key for the table books. For each primary key type there is a table-valued function. This identifies the correct table-valued function for DB2. |