© Microsoft Corporation. All rights reserved.

TABLE 1: SqlCommand Execution Methods
Method Description
ExecuteNonQuery Executes an SQL statement on the connected data source. You can use it for DDL statements, action queries (e.g., INSERT, UPDATE, and DELETE operations), and ad hoc queries. This method returns the number of rows affected but doesn't return output parameters or result sets.
ExecuteReader Executes an SQL SELECT statement on the data source and returns a fast forward-only result.
ExecuteScalar Executes a stored procedure or an SQL statement that returns a single scalar value. It returns the first row of the result set's first column to the calling application and ignores any other returned values.
ExecuteXMLReader Executes a FOR XML SELECT statement that returns an XML data stream from the data source. The ExecuteXMLReader method is compatible only with SQL Server 2000 and later releases.