CONTAINS and CONTAINSTABLE

The CONTAINS and CONTAINSTABLE predicates have the following parameters:

Search phrase

Generation

Proximity

Weighted

Search Phrase

The search phrase is the phrase or word that you are looking for in a full-text indexed table. If you are searching for more than one word, you have to wrap your search phrase in double quotation marks, as in this example:

image

In this query, you are searching all full-text indexed columns. However, you can search a single column, a list of columns, or all columns. The following example shows how:

You can also use Boolean operators in your search phrase, as in this example:

This example ...

Get Microsoft® SQL Server 2008 R2 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.