金卧牛:mysql查询表中一共多少条数据
豪阳的回答:
select count(1) from table_name 实际中这一句运行可能更快
指间砂的回答:
用count函数就可以查看。 比如表名叫test。 要查询表中一共有多少条记录 select count(*) from test; 如果按条件查询的话,就正常使用where条件即可 select count(*) from test where id=1;
经验分享互联网动态
更多阅读推荐
select count(1) from table_name 实际中这一句运行可能更快
用count函数就可以查看。 比如表名叫test。 要查询表中一共有多少条记录 select count(*) from test; 如果按条件查询的话,就正常使用where条件即可 select count(*) from test where id=1;