Differentiate ExecuteNonQuery and ExecuteSclar and give the example for both?
Manoj Kumar Duraisamy
Select an image from your device to upload
execute scalar return a single value and execute nonquery return only the number of affected rows.
Executenonquery is used to Data Manipulation Language(Insert/update/delete) Operation while ExecuteScaler is used to fetch one object only. like Aggrigation function.