.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+
The page you are viewing does not exist in the .NET Core 3.0+ platform documentation. This link will take you to the parent topic of the current section.

Session.ExecuteScalar Method

Name Parameters Description
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.
ExecuteScalar(String, QueryParameterCollection) sql, parameters
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
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.