Contents Index Comparing dates in search conditions Matching rows by sound

ASA Getting Started
  Selecting Data from Database Tables
    Selecting rows from a table

Pattern matching in search conditions


Pattern matching is a versatile way of identifying character data. In SQL, the LIKE keyword is used to search for patterns. Pattern matching employs wildcard characters to match different combinations of characters.

List all employees whose last name begins with BR

List all employees whose last name begins with BR, followed by zero or more letters and a T, followed by zero or more letters

Another special character that can be used with LIKE is the _ (underscore) character, which matches exactly one character. For example, the pattern 'BR_U%' matches all names starting with BR and having U as the fourth letter. In Braun the _ character matches the letter A and the % matches N.

For more information, see LIKE conditions.


Contents Index Comparing dates in search conditions Matching rows by sound