4D v16

like_predicate

Home

 
4D v16
like_predicate

like_predicate  


 

 

 arithmetic_expression [NOT] LIKE arithmetic_expression [ESCAPE sql_string]

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.

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

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

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

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

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

SELECT * FROM suppliers
WHERE supplier_name LIKE 'Sm_th'



Siehe auch 

arithmetic_expression
predicate

 
EIGENSCHAFTEN 

Produkt: 4D
Thema: Syntax rules

 
GESCHICHTE 

 
ARTIKELVERWENDUNG

4D - SQL Reference ( 4D v16)