Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我不知道是否可以从每个mysql表行中计算和添加。
这就是我所拥有的:
id: visits: 1 : 23 : 2 : 53 : 3 : 12 : 4 : 33 :
我想计算并添加每行的所有访问次数,我应该获得的总访问次数为 121 次。
如果这有意义。
SELECT SUM(visits)as visitCounts FROM ( SELECT visits FROM tableName ) v
http://sqlfiddle.com/#!2/8a0f4/5