ServerConnection.ExecuteScalar Method

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

备注

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

仅 Microsoft .NET Framework 的 2.0 版本支持此命名空间、类或成员。

重载列表

名称 Description
ServerConnection.ExecuteScalar (String)
Executes a Transact-SQL statement and returns the first column of the first row as an object value.
ServerConnection.ExecuteScalar (StringCollection)
Executes a batch of Transact-SQL statements and returns the first column of the first row as an object value.

请参阅

参考

ServerConnection Class
ServerConnection Members
Microsoft.SqlServer.Management.Common Namespace

其他资源

Calling Methods