CONTAINSTABLE
ranked full-text search
What changes
- Input
- full-text index of a table, search condition
- Output or change
- rowset of KEY and RANK
Syntax at a glance
CONTAINSTABLE ( table , { column_name | ( column_list ) | * } , ' <contains_search_condition> ' [ , LANGUAGE language_term ] [ , top_n_by_rank ] )
Work example
A search result needs full-text matches with rank values for sorting.
Check the full-text catalog state and query a small fixture with a known match. Treat rank as a relative score, not a probability.
Check your work CONTAINSTABLE. The expected key appears and its rank is used only to order matching rows.
Open Microsoft Learn for full syntax, permissions, and details for your version.