Click to Rate and Give Feedback
MSDN
MSDN Library
SQL Server
SQL Server 2008
Database Engine
Development
Full-Text Search
 Searching for Specific Word or Phra...
Community Content
In this section
Statistics Annotations (0)
Other versions are also available for the following:
SQL Server 2008 Books Online (October 2008)
Searching for Specific Word or Phrase (Simple Term)

You can use the CONTAINS predicate to search a table for a specific phrase.

For example, if you want to search the ProductReview table in the AdventureWorks database to find all comments about a product with the phrase "learning curve", you could use the CONTAINS predicate as follows.

USE AdventureWorks;
GO
SELECT Comments
FROM Production.ProductReview
WHERE CONTAINS(Comments, ' "learning curve" ');
GO

The CONTAINS predicate uses functional notation in which the first parameter is the name of the column or list of columns being searched, and the second parameter is a full-text search condition. The search condition, in this case "learning curve", can be quite complex and can be composed of one or more terms

ms142538.note(en-us,SQL.100).gifNote:
The full-text search queries are case-insensitive. However, in Japanese, there are multiple phonetic orthographies in which the concept of orthographic normalization is akin to case insensitivity (for example, kana = insensitivity). This type of orthographic normalization is not supported.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker