like_predicate

4D - Documentation   Français   English   German   Japanese   4D SQL Reference, Table of Contents   4D SQL Reference, Index   Back   Previous   Next

version 11


arithmetic_expression [NOT] LIKE arithmetic_expression [ESCAPE sql_string]

Description

A like_predicate is used to retrieve data matching the arithmetic_expression passed after the LIKE keyword. You can also pass the NOT keyword to search for data differing from this expression. The ESCAPE keyword can be used to prevent the character passed in sql_string from being interpreted as a wildcard. It is usually used when you want to search for the '%' or '_' characters.

Examples

1. This example selects the suppliers whose name contains "bob":

   SELECT * FROM suppliers
   WHERE supplier_name LIKE '%bob%';

2. Selects suppliers whose name does not begin with the letter T:


   SELECT * FROM suppliers
   WHERE supplier_name NOT LIKE 'T%';

3. Selects suppliers whose name begins with "Sm" and ends with "th":


   SELECT * FROM suppliers
   WHERE supplier_name LIKE 'Sm_th'
See Also

arithmetic_expression, predicate.


4D - Documentation   Français   English   German   Japanese   4D SQL Reference, Table of Contents   4D SQL Reference, Index   Back   Previous   Next