Compartilhar via


Método ExecuteScalar

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

Esse membro está sobrecarregado. Para obter informações mais completas sobre esse membro, incluindo sintaxe, uso e exemplos, clique em um nome na lista de sobrecarga.

Lista de sobrecargas

  Nome Descrição
Método público ExecuteScalar(StringCollection) Executes a batch of Transact-SQL statements and returns the first column of the first row as an object value.
Método público ExecuteScalar(String) Executes a Transact-SQL statement and returns the first column of the first row as an object value.

Início

Comentários

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