1.查詢表有多少條記錄
select count(*) from table;
2.查詢表中符合條件的記錄數
select count(*) from table where id > 100;
3.查詢每個分組的記錄數
select name, count(*) as count from table group by name;
1.查詢表有多少條記錄
select count(*) from table;
2.查詢表中符合條件的記錄數
select count(*) from table where id > 100;
3.查詢每個分組的記錄數
select name, count(*) as count from table group by name;
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。