2019-02-18
閱讀量:
905
SQL 1093錯(cuò)誤
SQL語(yǔ)句如下:
update t_account set balance=(
select balance-?
from t_account
where account=?)
where account=?;
報(bào)錯(cuò)如下:
[SQL]update t_account set balance=(
select balance-200
from t_account
where account=12345)
where account = 12345;
[Err] 1093 - You can't specify target table 't_account' for update in FROM clause
答:
解決方法:
update t_account set balance=balance-?
where account=?;






評(píng)論(0)


暫無(wú)數(shù)據(jù)
CDA考試動(dòng)態(tài)
CDA報(bào)考指南
推薦帖子
0條評(píng)論
0條評(píng)論
0條評(píng)論
1條評(píng)論