Export (0) Print
Expand All
1 out of 7 rated this helpful - Rate this topic

Querying Multiple Columns (Full-Text Search)

You can use the CONTAINS predicate to query multiple columns by specifying a list of columns to search. The columns must be from the same table.

The following query searches for the term Red in the Name and Color fields of the Production.Product table.

Use AdventureWorks2008R2;
GO
SELECT Name, Color FROM Production.Product
WHERE CONTAINS((Name, Color), 'Red');


Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.