[英]How can I subtract a user input value from a value in a MySQL table only if the value in the field is equal to or greater than the input value?
[英]How to subtract user inputted value in a specific table value?
例如,假设我有一个表,名称为“ Budget”,列为“ funds”。 当用户以VB形式输入值时,它将保存在注册表的“金额”列中,并且在其中输入的值将从“资金”中扣除。 我试过了但是失败了。
Update 'Table Name' SET Funds = (Funds - 'Value inserted')
这可能是正确的查询,可能是插入值的数据类型与资金有所不同。
Update 'Table Name' SET Funds = (Funds - 'Value inserted')
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.