What is Executescalar and Executenon query ?

Forums .NETWhat is Executescalar and Executenon query ?
Staff asked 2 months ago

Answers (1)

Add Answer
Umang Ramani Marked As Accepted
Staff answered 2 months ago


This technique will only be used for insert, update, and delete, as well as Create and SET statements. The number of rows affected by INSERT, DELETE, or UPDATE actions will be returned by the ExecuteNonQuery method.



Single values can be retrieved from the database relatively quickly. On execution of a SQL Query or Stored Procedure using the command object, Execute Scalar will return a single row single column value.


Select Categories