LIKE and NOT LIKE

You can use the LIKE predicate to compare two character strings for a partial match. Partial matches are valuable if you don’t know the exact form of the string for which you’re searching. You can also use partial matches to retrieve multiple rows that contain similar strings in one of the table’s columns.

To identify partial matches, SQL uses two wildcard characters. The percent sign (%) can stand for any string of characters that have zero or more characters. The underscore (_) stands for any single character.

WHERE String LIKE 'auto%'
auto
automotive
automobile
automatic
autocracy

WHERE String LIKE '%ode%'
code of conduct
model citizen

WHERE String LIKE '_o_e'
mope
tote
rope
love
node
WHERE Email NOT LIKE '%@databasecentral.info'
SELECT Quote
FROM BARTLETTS
WHERE Quote LIKE '20#%'
ESCAPE '#' ;

The % character is escaped by the preceding # sign, so the statement interprets this symbol as a percent sign rather than as a wildcard.