LIKE Predicate in Enterprise Search SQL Syntax
Performs pattern-matching comparison on the specified column.
…WHERE <column> LIKE <wildcard_literal>
Remarks
The specified column can be a regular or delimited identifier, and must be single-valued; the column cannot be multivalued. The column is also limited to the properties in the property store.
The wildcard literal is a string literal, enclosed in quotation marks, and optionally can contain wildcards. The match string can contain multiple wildcards if needed. The following table describes the wildcard characters that the LIKE predicate recognizes.
Wildcard | Description | Example |
---|---|---|
% (percent) |
Matches zero or more of any character. |
|
_ (underscore) |
Matches any single character. |
followed by exactly one of any character, followed by "ter". |
[ ] (square brackets) |
Matches any single character within the specified range or set. For example [a-z] specifies a range; [aeiou] specifies the set of vowels. |
|
[^ ] (caret) |
Matches any single character that is not within the specified range or set. For example, [^a-z] specifies a range that excludes lowercase a through lowercase z; [^aeiou] specifies a set that excludes lowercase vowels. |
|
Note
To match the wildcard characters percent sign (%), underscore (_), or the left square bracket ( [ ), place the character inside square brackets. For example, to match the percent sign, use [%]
.