Home  >  Article  >  Database  >  mysql:去除重复行,重复行相加,并修改表。

mysql:去除重复行,重复行相加,并修改表。

WBOY
WBOYOriginal
2016-06-06 09:44:071287browse

mysql

| 冷水江 | 0.076923 |
| 一 | 0.076923 |
| 煤矿 | 0.076923 |
| 发生 | 0.076923 |
| 瓦斯 | 0.076923 |
| 爆炸 | 0.076923 |
| 事故 | 0.076923 |
| 南京 | 0.076923 |
| 一 | 0.076923 |
以上是原始表;
目标表:
| 冷水江 | 0.076923 |
| 一 | 0.153865 |
| 煤矿 | 0.076923 |
| 发生 | 0.076923 |
| 瓦斯 | 0.076923 |
| 爆炸 | 0.076923 |
| 事故 | 0.076923 |
| 南京 | 0.076923 |

即将重复的“一”相加并修改表。
大家帮帮忙,谢谢。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn