Rumah > Artikel > pangkalan data > mysql-Mysql中com.ExecuteScalar(); 为什么先转为long再int??
mysqlsqlc#
Mysql中int sum=(int)(long)com.ExecuteScalar(); 为什么好先转为long再int??
MySqlCommand com=new MySqlCommand("SELECT COUNT(*) from student",conn);
int sum=(int)(long)com.ExecuteScalar();