|
<< Click to Display Table of Contents >> Navigation: SQL features > Contains (full text search) |
Contains function allows to select records containing certain words in a text field.
Example:
select title, overview from movies.movie where Contains(overview, 'Leia Luke')
Result may be sorted by relevance
select title, overview from movies.movie where Contains(overview, 'Leia Luke')
order by relevance desc
Second parameter may contain AND and OR operators
select title, overview from movies.movie where Contains(overview, 'Han AND Leia OR Luke')
To highlight found words use Highlight function
select title, highlight(overview, '<b>', '</b>') overview from movies.movie where Contains(overview, 'Leia Luke')