집 >데이터 베이스 >MySQL 튜토리얼 >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();