SQLite GLOB() Function
Example
Check which customer names start with a capital A:
SELECT CustomerName, GLOB('A*', CustomerName)
FROM Customers;
Try it Yourself »
Definition and Usage
The GLOB() function checks if a text matches a pattern. It returns 1 if it matches, and 0 if it does not.
GLOB(pattern, text) is the same as text GLOB pattern. Note that the pattern is the first argument.
Tip: Also look at LIKE().
Syntax
GLOB(pattern, text)
Parameter Values
| Parameter | Description |
|---|---|
| pattern | Required. The pattern. * means any number of characters, and ? means one character |
| text | Required. The text to check |
Technical Details
| Return type: | Integer |
|---|