Share via


ExecuteScalar-Methode

Executes a Transact-SQL statement and returns the first column of the first row as a value type.

Das Element ist überladen. Um vollständige Informationen zu diesem Element zu erhalten, einschließlich Syntax, Verwendung und Beispielen, klicken Sie auf einen Namen in der Überladungsliste.

Überladungsliste

  Name Beschreibung
Öffentliche Methode ExecuteScalar(StringCollection) Executes a batch of Transact-SQL statements and returns the first column of the first row as an object value.
Öffentliche Methode ExecuteScalar(String) Executes a Transact-SQL statement and returns the first column of the first row as an object value.

Zum Anfang

Hinweise

If multiple batches are specified by using a StringCollection object then the result is an array of value types.