Syntax of FREETEXTTABLE Function :
FREETEXTTABLE (table , { column | * } , 'freetext_string' [ ,top_n_by_rank ] )
table is a name of table that has been marked for full-text querying.
column is a name of column to search. Column of type character string are valid full-text searching columns.
* Specifies that all columns in the table that have been registered for full-text searching should be used to search for the given freetext_string.
freetext_string is a text to search for in the specified column.
top_n_by_rank specifies that only top n matches are returned.
Examples of FREETEXTTABLE Function :
Example 1 : Use of FREETEXTTABLE function in select clause
SELECT Cust.ContactName, Cust.CompanyName, KEY_TBL.RANK
FROM Customers Cust
INNER JOIN FREETEXTTABLE(Customers, ContactName, 'maria ann hanna victoria') AS KEY_TBL
ON Cust.CustomerID = KEY_TBL.[KEY]
ORDER BY RANK
ContactName CompanyName RANK
Maria Anders Alfreds Futterkiste 18
Maria Larsson Folk och fä HB 18
Hanna Moos Blauer See Delikatessen 21
Victoria Ashworth B's Beverages 21
Ann Devon Eastern Connection 21
Above example returns all customers having contact name from the specified text 'maria ann hanna victoria'.