问题是从有贷款和储蓄账户的储蓄账户余额中扣除 1% 的服务费。
架构是
“分支”表(分支名称、分支城市、资产)
“客户”表(客户名称、客户街道、客户城市)
“账户”表(account_number、branch_name、balance)
“贷款”表(loan_number、branch_name、amount)
“存款人”表(customer_name,account_number)
“借款人”表(customer_name、loan_number)
我试过这个:
update account
-> set balance=balance*0.99
-> where (select distinct customer_name from
->borrower where customer_name in(select
->customer_name from depositor));
但收到错误 1242。有人可以帮我解决这个问题吗?