Wednesday 29 May 2013

LIKE Condition in SQL


  • Use the LIKE condition to perform wildcard searches of valid search string values.
  • Search conditions can contain either literal characters or number:
    • % denotes zero or many characters.
    • _ denotes one character.
Example:


Example: 
We can combine Pattern-Matching characters.


The % and _ symbols can be used in any combination with literal characters. The example on the slide displays the name of all employees whose name have an O as the second character. (in upper example)

The lower example displays the names of employees who has job ending with ER.


No comments:

Post a Comment