去评论
推扬网

金卧牛:mysql查询表中一共多少条数据

admin
2020/08/11 16:57:31

豪阳的回答:

select count(1) from table_name 实际中这一句运行可能更快

指间砂的回答:

用count函数就可以查看。 比如表名叫test。 要查询表中一共有多少条记录 select count(*) from test; 如果按条件查询的话,就正常使用where条件即可 select count(*) from test where id=1;