You can perform a full text query either by using a CONTAINS clause in the FROM clause of a SELECT statement, or by using a CONTAINS search condition (predicate) in a WHERE clause. Both return the same rows; however, use a CONTAINS clause in a FROM clause also returns scores for the matching rows.
The following examples show how the CONTAINS clause and search condition are used in a query. However, if you run these examples in Interactive SQL they will fail because you have not built a text index on MarketingInformation.Description yet.
SELECT * FROM MarketingInformation CONTAINS ( Description, 'cotton' );
SELECT * FROM MarketingInformation WHERE CONTAINS ( Description, 'cotton' );
Term and phrase searching
Tutorial: Performing a full text search on a GENERIC text index
Tutorial: Performing a fuzzy full text search
Tutorial: Performing a full text search on an NGRAM text index
Discuss this page in DocCommentXchange.
|Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0|