API

ExecuteScalar

Returns the first column of the first result row, or null when no row exists.

Formal Syntax & Structure

csharp syntaxcsharp
command.ExecuteScalar()

Working Example

Example Snippetcsharp
// Documentary fragment; see linked lesson for context.command.ExecuteScalar()
C# & .NET Reference