Partilhar via


SELECT Statement in SharePoint Search SQL Syntax

Applies to: SharePoint Server 2010

Defines in the first clause of statement the columns to return in the rowset.

SELECT <columns> …

Remarks

You specify what information to return in the <columns> specification. You must specify at least one column of information to retrieve.

Note

SharePoint Server search does not support using column aliases.

Specifying Query Columns

Following is the columns portion of the SELECT clause syntax:

<column> [ {, <column>} … ]

Separate multiple column specifiers by using commas. Column names can be either regular or delimited identifiers. When the query returns a document that does not have the requested column, the value of that column for the document is NULL.

In the SQL query, you are allowed to use the asterisk (*) to specify that all columns in a table are to be returned. However, no defined and fixed set of properties applies to all documents. For this reason, the SQL asterisk is not permitted in the <columns> setting.

Note

SharePoint Server search does not support the following: column aliasing; casting the column data type as it is returned in the query; limiting the column length (the full length of each text property is returned).

See Also

Reference

FROM Clause in SharePoint Search SQL Syntax

WHERE Clause in SharePoint Search SQL Syntax

Overview of the SharePoint Search SQL Query

Concepts

SharePoint Search SQL Syntax Reference