📅  最后修改于: 2022-03-11 14:49:19.910000             🧑  作者: Mango
string sql = "SELECT COUNT(*) FROM [DB].[dbo].[myTable]";
SqlCommand cmd = new SqlComman(sql, connectionString);
int count = (int)cmd.ExecuteScalar();