Answers for "How to read SQL Server COUNT from SqlDataReader"

C#
1

How to read SQL Server COUNT from SqlDataReader

string sql = "SELECT COUNT(*) FROM [DB].[dbo].[myTable]";
SqlCommand cmd = new SqlComman(sql, connectionString);
int count = (int)cmd.ExecuteScalar();
Posted by: Guest on October-05-2021

Code answers related to "How to read SQL Server COUNT from SqlDataReader"

C# Answers by Framework

Browse Popular Code Answers by Language