用select count(*) from表名
//根据SqlDataReader获得查询记录数
SqlDataReader dr1 = Common.DoSelect("count(*)", "ROLE");
int count = 0;
while (dr1.Read())
{
count = Convert.ToInt32(dr1[0].ToString());
}
dr1.Close();