命令行(cmd)中:
select count(1) from 表名;
或者
select count(*) from 表名;
C++中(已连接数据库的情况下):
MYSQL myCont;
res=mysql_store_result(&myCont);
int n=mysql_num_rows(res);
命令行(cmd)中:
select count(1) from 表名;
或者
select count(*) from 表名;
C++中(已连接数据库的情况下):
MYSQL myCont;
res=mysql_store_result(&myCont);
int n=mysql_num_rows(res);