Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 12.0.0 » SQL Anywhere Server - SQL Usage » Querying and modifying data » Full text search


How to perform a full text search

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.

   FROM MarketingInformation CONTAINS ( Description, 'cotton' );
   FROM MarketingInformation
   WHERE CONTAINS ( Description, 'cotton' );
 Types of full text searches

Term and phrase searching
Prefix searching
Proximity searching
Boolean searching
Fuzzy searching
View 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