Literal Value Comparison in SharePoint Search SQL Syntax

Last modified: April 21, 2010

Applies to: SharePoint Server 2010

Uses standard comparison operators for matching a single-valued column to a literal value.

…WHERE <column> <comp_op> <literal>

The right side of the comparison must be a literal. You cannot compare a column against a computed value, or against another column.

For information about comparing multivalued columns, see Multivalued (ARRAY) Comparisons in SharePoint Search SQL Syntax.

The column part can be any valid column. The literal can be any string, numerical, hexadecimal, Boolean, or date literal value. Only exact matches are allowed, and wildcard characters are ignored. The literal can also be type-cast.

The following table describes the supported comparison operators.




Equal to

!= or <>

Not equal to


Greater than


Greater than or equal to


Less than


Less than or equal to

Following are examples of the literal value comparison predicate.

…WHERE Author='John Smith'

…WHERE BugStatus != "Resolved"

…WHERE size >= 10000