You can't specify target table 'table' for update in FROM clause

NoSuchKey