What are all the difference between Like and Contains ?

Answers were Sorted based on User's Feedback



What are all the difference between Like and Contains ?..

Answer / rubyna

Like gives additional option of specifying exact
string/character position in the text. eg. if we want to
search all words having second letter 'a', we can use like,
but cannot use contain-

select * from emp where emp.name like '_a%'.

We don't have corresponding statement with contains.

Is This Answer Correct ?    4 Yes 0 No

What are all the difference between Like and Contains ?..

Answer / 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

More SQL PLSQL Interview Questions

Is pl sql still used?

0 Answers  


What are the Diff B/W Cursor and REF Cursor

3 Answers   CTS,


What is pivot table in sql?

0 Answers  


Should I use mbr or gpt?

0 Answers  


What are the ways on commenting in a pl/sql code?

0 Answers  






How we get all_group_function's(Sum,avg,count,max and min_value of a column(Sal) Using pl/sql anonymous block, with out using group function's. You shouldn't use more than one select statement in entire the program. Like cursor c is select * from <table_name>; except this you can't use another select statement. You can use no of variables as per requirement.

1 Answers  


What is sql stand for?

0 Answers  


What does desc stand for?

0 Answers  


what is mean by forward declaration and where we'll use it.

4 Answers   TCS,


HOW TO APPEAR FOR ONLINE EXAMS OF SQL & PL/SQL? WHICH BOOKS WILL BE BETTER FOR REFERENCE TO QUALIFY THESE EXAMS? ARE THERE ANY MODEL PAPERS AVAILABLE IN THE MARKET ABOUT SQL & PLSQL?

2 Answers  


How many joins can you have in sql?

0 Answers  


What is the difference between anonymous block and named blocks?

3 Answers  


Categories