Link to home
Start Free TrialLog in
Avatar of milani_lucie
milani_lucieFlag for United States of America

asked on

Difference between "CONTAINS" and "FREETEXT" in FULL TEXT SEARCH - SQL Server

Hi,

Can you please let me know in simple terms the

Difference between "CONTAINS" and "FREETEXT" in FULL TEXT SEARCH ?

Please provide sample code to understand it better. No articles please !

Thanks
Avatar of Christopher Gordon
Christopher Gordon
Flag of United States of America image

"CONTAINS" looks for one word.  Search variable should not be a string with spaces.  Just one word.

"FREETEXT" looks for multiple words. Search variable can have multiple words and it will search on all of them
ASKER CERTIFIED SOLUTION
Avatar of Anthony Perkins
Anthony Perkins
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SinghAmandeep,

Unfortunately, you have chosen to copy and paste without giving any credit from here:
Comparing Full-Text Functions and Full-Text Predicates
http://msdn.microsoft.com/en-us/library/ms142494(SQL.90).aspx

This is a direct violation of EE Guidelines. See here:
https://www.experts-exchange.com/help.jsp#hs=23&hi=605
About copyrights
Copying and pasting a web page or other document is considered copyright infringement in most cases. If you want to refer to someone else's work the preferred method is to post the link with a brief description of it. Posts that consist entirely of work copied and pasted from other sites will generally be deleted unless it's from your own work.


I have asked a Moderator to review.
Avatar of milani_lucie

ASKER

Any more comments ?

Thanks
Anything specific you're looking for?  

acperkins provided you with a good high level explanation.  
I provided you some high level code on how you'd use in T-SQL.

Are we missing something? :)  

Thanks!
Anything specific you're looking for?  

acperkins provided you with a good high level explanation.  
I provided you some high level code on how you'd use in T-SQL.

Are we missing something? :)  

Thanks!