use information_schema
select table_name,table_rows from tables
where TABLE_SCHEMA = '数据库名'
order by table_rows desc
查询出来的是每张表的行数
用count函数就可以查看。 比如表名叫test。 要查询表中一共有多少条记录 select count(*) from test如果按条件查询的话,就正常使用where条件即可 select count(*) from test where id=1用语句SELECT count(*) FROM table_name查询,下面以查询数据库history下的表格名为111的数据条数为例:
1、在命令行输入mysql -u root -p,再输入mysql的密码进入mysql
2、输入use history进入history数据库
3、输入语句SELECT count(*) FROM 111查询表格111的总数据条数
4、如下图所示,可以看到总数据条数是1744364
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)