DELETE FROM score WHERE id NOT IN ( SELECT MIN(id) FROM score GROUP BY NAME ) code
報錯: ci
查詢:delete FROM score where id not in ( select min(id) from score group by name ) 錯誤代碼: 1093
You can't specify target table 'score' for update in FROM clause
執行耗時 : 0 sec
傳送時間 : 0 sec
總耗時 : 0 sec
---------------------------------------------------
get
錯誤提示就是說,不能先select出同一表中的某些值,再update這個表(在同一語句中)