Skip to main content
.NET 8.0+

Session.ExecuteScalar Method

Name Parameters Description
ExecuteScalar(String, QueryParameterCollection) sql, parameters Executes the specified SQL query and returns the first column of the first row in the result set returned by the query.
ExecuteScalar(String, Object[]) sql, parameterValues Executes the specified SQL query and returns the first column of the first row in the result set returned by the query.
ExecuteScalar(String, String[], QueryParameterCollection) sql, parameterNames, parameters Executes the specified SQL query and returns the first column of the first row in the result set returned by the query.
ExecuteScalar(String, String[], Object[]) sql, parameterNames, parameterValues Executes the specified SQL query and returns the first column of the first row in the result set returned by the query.
ExecuteScalar(String) sql Executes the specified SQL query and returns the first column of the first row in the result set returned by the query.