You can't specify target table for update in FROM clause [Error 1093]
There is table named as ,
- loan (loan_number, branch_name, amount);
i have to perform operation on this table is,
-Decrement the loan by 5% whose amount is less than average amount;
The query which i tried is,
-ERROR 1093 (HY000): You can't specify target table 'loan' for update in FROM clause
- loan (loan_number, branch_name, amount);
i have to perform operation on this table is,
-Decrement the loan by 5% whose amount is less than average amount;
The query which i tried is,
update loan set amount=amount*0.95 where amount < (select avg(amount) from loan);But i am getting error as,
-ERROR 1093 (HY000): You can't specify target table 'loan' for update in FROM clause
0