Like



LIKE matches a value against a pattern. Matching is not case-sensitive. Use NOT LIKE to match values that do not fit the pattern.

Wildcards

  • % matches zero, one or more characters.
  • _ matches exactly one character.


round-pushpin Selects words that begin with 'Cat'.
SELECT * FROM WordList:Word WHERE Text LIKE 'Cat%'

round-pushpin Selects words that end with 'gorge'.
SELECT * FROM WordList:Word WHERE Text LIKE '%gorge'

round-pushpin Selects words that contain 'at'.
SELECT * FROM WordList:Word WHERE Text LIKE '%at%'

round-pushpin Selects words that contain a three letter sequence that begins with 'C' and ends with 't'.
SELECT * FROM WordList:Word WHERE Text LIKE '%C_t%'

round-pushpin Selects words that do not begin with 'Cat'.
SELECT * FROM WordList:Word WHERE Text NOT LIKE 'Cat%'




SQL :: Between
Matches values that fall within a given range.
SQL :: Expressions
Literals, operators, comments and variables in KBSQL.
SQL :: IsLike
Returns true (1) if the text matches the pattern. The pattern uses the same wildcards as Like: **%** matches any number of characters and **_** matches a single character.
SQL :: IsNotLike
Returns true (1) if the text does not match the pattern. See Like for the wildcards.
SQL :: Keywords
A breakdown of all of the statements and keywords supported by the query processor.
SQL :: Not
The NOT keyword negates LIKE and BETWEEN.
SQL :: Where
The where clause filters the documents read, updated or deleted by a statement.