Freigeben über


NULL Predicate

Note

Indexing Service is no longer supported as of Windows XP and is unavailable for use as of Windows 8. Instead, use Windows Search for client side search and Microsoft Search Server Express for server side search.

 

The NULL predicate determines whether a column in a selected row is defined. This predicate is an optional part of the optional WHERE clause of the SELECT statement.

SELECT Select_List | *
       FROM_Clause
       [WHERE Column_Reference IS [NOT] NULL]
       [ORDER_BY_Clause]

Parameters

Select_List

Specifies the list of column aliases (properties) making up the table (rowset) that is returned as a result of the query.

* (asterisk)

Specifies all columns. This option is valid only when the FROM_Clause parameter references a predefined view or a temporary view.

FROM_Clause

Specifies the files on which to perform the search. For details about this parameter, see FROM Clause.

Column_Reference

Specifies the column name (alias).

ORDER_BY_Clause

Specifies the ordering of the resulting rowset. This clause is optional. For details about this parameter, see ORDER BY Clause.

Remarks

In the NULL predicate, you must use the IS operator. The syntax WHERE Column_Reference = NULL is invalid.

Example

The following example retrieves rows consisting of the FileName and DocAuthor properties for all files under the virtual root "/contracts", where DocAuthor is defined.

SELECT FileName, DocAuthor FROM SCOPE('"/contracts"') WHERE DocAuthor IS NOT NULL

ARRAY Predicate

Comparison Predicate

CONTAINS Predicate

FREETEXT Predicate

LIKE Predicate

MATCHES Predicate

WHERE Clause