O'Reilly logo

Guru's Guide to SQL Server Architecture and Internals, The by Ken Henderson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Full-Text Predicates

A predicate is a logical construct that returns TRUE or NOT TRUE. (I'll avoid FALSE here because of the issues related to three-value logic.) In SQL, these usually take the form of functions and reside in the WHERE clause. LIKE and EXISTS are examples of WHERE clause predicates.

When full-text searching is enabled, two additional predicates are available in Transact-SQL: CONTAINS and FREETEXT. CONTAINS provides support for both exact and inexact string matches, searches based on word proximity, word inflection searches, and weighted searches. FREETEXT, by contrast, is used to find words or phrases with the same basic meaning as those in the search term.

Before we begin exploring these functions via code, let's enable full-text ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required