可以經由過程mysql統計函數,來計較表中總數,最年夜值,最小值等
進入cmd號令行窗口
輸入mysql -u root -p號令,然后回車
提醒輸入暗碼,輸入準確的暗碼,進入mysql號令行
對test數據庫中的user表進行統計,
利用select count(1) from user 查詢表中有幾多條數據
select max(age) from user 取價錢的最年夜值
select min(age) from user取價錢的最小值 select sum(age) from user取價錢的總和 select avg(age) from user取價錢的平均值
0 篇文章
如果覺得我的文章對您有用,請隨意打賞。你的支持將鼓勵我繼續創作!