CREATE TABLE `sample` (
`number` double NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
mysql> select * from sample
+-------------------+
| number |
+-------------------+
| 1 |
| 2 |
| 3.5 |
| 4.5 |
| 0.1 |
+-------------------+
我怎樣才能得到三個十進制數?MySQL:我怎樣才能從雙類型列獲得十進制值?
+-------------------+
| number |
+-------------------+
| 3.5 |
| 4.5 |
| 0.1 |
+-------------------+
用簡單的算術 – Strawberry
http://stackoverflow.com/questions/1860542/what-would-be-a-reliable-way-to-get-fractional-value-from-a-號碼 –
感謝您的意見 – zono