How To Use LIKE Conditions?

Answer

A LIKE condition is also called pattern patch. There are 3 main rules on using LIKE condition:

* \'_\' is used in the pattern to match any one character.
* \'%\' is used in the pattern to match any zero or more characters.
* ESCAPE clause is used to provide the escape character in the pattern.

The following tutorial exercise provides you some good pattern matching examples:

SELECT \'WithoutBook.com\' LIKE \'%center%\' FROM DUAL;
1

SELECT \'WithoutBook.com\' LIKE \'%CENTER%\' FROM DUAL;
1
-- Case insensitive by default

SELECT \'WithoutBook.com\' LIKE \'%CENTER_com\' FROM DUAL;
1

All sql dba Questions

Ask your interview questions on sql-dba

Write Your comment or Questions if you want the answers on sql-dba from sql-dba Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---