久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長(zhǎng)資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      mysql怎樣多列求和

      在mysql中,可以利用sum()函數(shù)進(jìn)行多列求和,該函數(shù)能夠返回?cái)?shù)值列的總數(shù),語(yǔ)法為“SELECT SUM(列1+列2+列3…) FROM table_name;”。

      mysql怎樣多列求和

      本教程操作環(huán)境:windows10系統(tǒng)、mysql8.0.22版本、Dell G3電腦。

      mysql怎樣多列求和

      SUM() 函數(shù)返回?cái)?shù)值列的總數(shù)。

      SQL SUM() 語(yǔ)法

      SELECT SUM(column_name) FROM table_name;

      演示數(shù)據(jù)庫(kù)

      在本教程中,我們將使用 RUNOOB 樣本數(shù)據(jù)庫(kù)。

      下面是選自 "access_log" 表的數(shù)據(jù):

      mysql> SELECT * FROM access_log; +-----+---------+-------+------------+ | aid | site_id | count | date       | +-----+---------+-------+------------+ |   1 |       1 |    45 | 2016-05-10 | |   2 |       3 |   100 | 2016-05-13 | |   3 |       1 |   230 | 2016-05-14 | |   4 |       2 |    10 | 2016-05-14 | |   5 |       5 |   205 | 2016-05-14 | |   6 |       4 |    13 | 2016-05-15 | |   7 |       3 |   220 | 2016-05-15 | |   8 |       5 |   545 | 2016-05-16 | |   9 |       3 |   201 | 2016-05-17 | +-----+---------+-------+------------+ 9 rows in set (0.00 sec)

      SQL SUM() 實(shí)例

      下面的 SQL 語(yǔ)句查找 "access_log" 表的 "count" 字段的總數(shù):

      實(shí)例

      SELECT SUM(count) AS nums FROM access_log;

      mysql怎樣多列求和

      2、統(tǒng)計(jì)所有講師的總分

      mysql怎樣多列求和

      示例語(yǔ)法如下:

      mysql怎樣多列求和

      推薦學(xué)習(xí):mysql視頻教程

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)