What are all the difference between Like and Contains ?

Answer Posted / santosh acharya

Select * from myTable where textField like '%Cats and Dogs%'

Select * from myTable where CONTAINS(textField, '"Cats and
Dogs"')

Both options will only return rows that contain the exact
phrase "Cats and Dogs", neither will return records that
contain either "Cats" or "Dogs" in them.

Is This Answer Correct ?    2 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a Mapplet?

645


How many tables can you join in sql?

535


Is sql an operating system?

545


What is on delete restrict?

542


When is the update_statistics command used?

572






What are the two virtual tables available at the time of database trigger execution?

641


How to execute a stored procedure?

565


What is meant by truncate in sql?

524


What is varchar data type in sql?

520


Can you join views in sql?

542


what is bcp? When does it used? : Sql dba

526


How do you go back in sql?

535


What are different functions in sql?

519


what is 'mysqladmin' in mysql? : Sql dba

534


How do I add a primary key to a table?

543