📜  executescalar 和 executenonquery 和 executereader 之间的区别 - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:55.411000             🧑  作者: Mango

代码示例1
ExecuteScalar() only returns the value from the first column of the first row of your query.
ExecuteReader() returns an object that can iterate over the entire result set.
ExecuteNonQuery() does not return data at all: only the number of rows affected by an insert, update, or delete