标签: mysql
我的mysql表(贷款)有paynamount,租金,日期和年龄列,我坚持这个计算我怎么做
Age=(paidamount/rental)-((datetimenow()-date)7)
并将其插入年龄栏。?
答案 0 :(得分:1)
您使用update:
update
update loan set age = (paidamount / rental) - datediff(curdate(), date) / 7;