使用count()函数统计sql select查询结果的条数量
使用sql select查询语句,并统计查询结果的记录条数,可以通过count()函数实现,COUNT() 函数会返回匹配指定条件的行数。
1、单个表查询
select count(*) as total from tablename where id > 50
2、数据表联合查询
select count(*) as total from (select * from tablename w...