Developer on Alibaba Coud: Build your first app with APIs, SDKs, and tutorials on the Alibaba Cloud. Read more ＞
Full-Text Search for SQL 7 is very similar to the Index Server retrieval method.
And, or, not
Logical expressions can be easily used in contains
Select username from member where contains (UserInfo, ' "Writer" and "Carpenter")
Select username from member where contains (UserInfo, ' "Writer" OR "Carpenter")
Select username from member where contains (UserInfo, ' "Writer" and not "Carpenter")
This is a keyword that is not in the normal logical expression, meaning it is very simple, that is to find the nearest two words
Select content from Microsoftrecord where contains (content, ' Bill Gates ')
NEAR "Paul Allen")
This means finding the full text containing Bill Gates and Paul Allen, and two words are not far apart.
This function can look up various forms of words, such as past tense, plural, verb form, noun form, etc. But it's no use to Chinese.
SELECT ProductName from the products WHERE CONTAINS (ProductName, ' formsof (inflectional, dry) ')
This feature can look up the prefix of a word, but it is not useful for Chinese
SELECT ProductName from the products WHERE CONTAINS (ProductName, ' dis* ')
This feature can give different weights to different conditions in a composite query to determine the order of the returned recordset
SELECT CategoryName, Description from Categories WHERE CONTAINS (Description, ' isabout
Spread weight (. 8), sauces weight (. 4), relishes weight (. 2))
The value of the weight can be from 0.0 to 1.0
It is used in the same way as contains, and this is no longer repeated here. To mention is that it returns a table for you to query further, not a query condition.
If you use this method, then the query will use the word segmentation technology to achieve fuzzy query, and filter out some non-keywords, more similar to the contains in the formsof, but there is no support for Chinese
SELECT CategoryName from Categories WHERE FREETEXT (Description, ' sweetest candy, bread and
Dry meat ')
The difference between it and FREETEXT is the same as that of contains and containstable.
This article is an English version of an article which is originally in the Chinese language on aliyun.com and is provided for information purposes only. This website makes no representation or warranty of any kind, either expressed or implied, as to the accuracy, completeness ownership or
reliability of the article or any translations thereof. If you have any concerns or complaints relating to the article, please send an email, providing a detailed description of the concern or
complaint, to firstname.lastname@example.org. A staff member will contact you within 5 working days. Once verified, infringing content will be removed immediately.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
and provide relevant evidence. A staff member will contact you within 5 working days.