Condividi tramite


Metodo ExecuteScalar

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

Questo membro è sottoposto a overload. Per informazioni complete su questo membro, inclusi sintassi, utilizzo ed esempi, fare clic su un nome nell'elenco di overload.

Elenco degli overload

  Nome Descrizione
Metodo pubblico ExecuteScalar(StringCollection) Executes a batch of Transact-SQL statements and returns the first column of the first row as an object value.
Metodo pubblico ExecuteScalar(String) Executes a Transact-SQL statement and returns the first column of the first row as an object value.

In alto

Osservazioni

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