Method ExecuteScalar
ExecuteScalar(QueryCommand)
Executes the query, and returns the first column of the first row in the result set returned by the query. Additional columns or rows are ignored.
Declaration
object ExecuteScalar(QueryCommand queryCommand)
Parameters
Type | Name | Description |
---|---|---|
Query |
queryCommand | Query |
Returns
Type | Description |
---|---|
System. |
The first column of the first row in the result set, or null if the result set is empty. |