4D v14

like_predicate

Home

 
4D v14
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'

 
PROPERTIES 

Product: 4D
Theme: Syntax rules

 
SEE ALSO 

arithmetic_expression
predicate

 
ARTICLE USAGE

4D SQL Reference ( 4D v11 SQL Release 4 )
4D SQL Reference ( 4D v14)
4D SQL Reference ( 4D v12.1)
4D SQL Reference ( 4D v13.4)
4D SQL Reference ( 4D v14 R2)
4D SQL Reference ( 4D v14 R3)
4D SQL Reference ( 4D v14 R4)