what operator performs pattern matching?

Answer Posted / rajendra prasad reddy penumall

'Like' operator is a pattren matching operator.

Eg;
select name from class where name like 'a%'

selecting names starting with letter 'a' and any length

select name from class where name like '_a%'
selecting names starting with second with letter 'a' and
any length.
select name from class where name like '[abc]%'
selecting names starting with first letter 'a'or 'b'
or 'c' and any length.

select name from class where name like '[^abc]%'
selecting names except starting with first letter with
letter 'a'or 'b' or 'c' and any length.

Is This Answer Correct ?    8 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you understand by sql server agent?

531


Which is the latest version of sql server and when it is released?

541


explain different types of backups avaialabe in sql server? Given a particular scenario, how would you go about choosing a backup plan? : Sql server database administration

589


What does <> symbol mean?

548


Does an index slow down updates on indexed columns?

577






Is there any difference between primary key and unique with the not null condition?

529


What happens if null values are involved in comparison operations?

540


How to declare and use cursor variables?

579


How do indexes help, types?

550


what data regions are and what are the different data regions?

101


tell me the disaster recovery plan

2023


How to write a query with a right outer join in ms sql server?

478


Write a query for primary key constraint with identity key word?

571


What security features are available for stored procedure?

589


Do you know what is a linked server in sql server?

547