Difference between revisions of "LIKE Predicate"
From Lianjapedia
Helen.george (Talk | contribs) |
Helen.george (Talk | contribs) |
||
Line 11: | Line 11: | ||
LIKE is a special predicate to evaluate whether the specified <expression1> matches <expression2>. The <expression2> can contain the following wildcards: | LIKE is a special predicate to evaluate whether the specified <expression1> matches <expression2>. The <expression2> can contain the following wildcards: | ||
− | {| class="wikitable" | + | {| class="wikitable" width=100% |
!Operator||Description | !Operator||Description | ||
|- | |- |
Revision as of 12:59, 18 January 2013
Contents
Purpose
Special predicate
Syntax
<expression1> [NOT] LIKE <expression2>
See Also
INSERT, PREDICATES, SELECT, UPDATE
Description
LIKE is a special predicate to evaluate whether the specified <expression1> matches <expression2>. The <expression2> can contain the following wildcards:
Operator | Description |
---|---|
_ | Any single character |
% | Zero or more characters |
The optional NOT evaluates whether the specified <expression1> does not match <expression2>.
Example
SELECT name, address, balance, cost*1.15; FROM accounts; WHERE paid_date < date() AND name LIKE "%inc%"; ORDER BY name, paid_date