如何将两列分成一个 table 并更新 sqlite 中的第三列?

How to divide two columns in one table and update the third column in sqlite?

我的 table 有六列。我想要 division 两列,即最后一列中的 Sum1Sum2,即 Division。我的数据库是 SQLite.

`Master       Class    SubClass    Sum1    Sum2    Division
 Stationary   Pencil     HB        1000    500     (1000 / 500)
 Stationary   Pencil     H1        500     400     (500 / 400)
 Boxes        Hard Box   Black      20      10      (20/10)
 BOxes        Card Boxes White      40      20      (40 / 20)

如何得到这个划分并更新Division列?

将字段转换为 FLOAT,这对我有用。

UPDATE [Table] SET [Division] =( CAST([Sum1] AS FLOAT) / [Sum2]);