mysql> select * from acoes;我確實喜歡把另外兩個區別放在一欄,我該怎麼辦?
+---------+----------+------------+------------+--------------------+
| idacoes | nomeacao | cotaminima | cotamaxima | volatilidadediaria |
+---------+----------+------------+------------+--------------------+
| 1 | abev4 | 10.20 | 11.80 | 0.00 |
| 2 | petr3 | 8.20 | 9.80 | 0.00 |
| 3 | votr2 | 15.00 | 16.80 | 0.00 |
| 4 | itau3 | 28.20 | 39.80 | 0.00 |
| 5 | mglu5 | 16.20 | 20.80 | 0.00 |
+---------+----------+------------+------------+--------------------+
我把想在列 'cotamaxima' 之間 'volatilidadediaria' 差異 - 'cotaminima'
+--------------------+
| volatilidadediaria |
+--------------------+
| 1.60 |
| 1.60 |
| 1.80 |
| 11.60 |
| 4.60 |
+--------------------+
是正確的,但是這不更新自己的表。 =/ –
如果你想更新然後嘗試我編輯的答案。 –