'Delete Query in MySQL 5.7 not working because error SQL Error [1093] shown

I tried to see other similar problems and i've done the same as other people but my delete clause is not working.

    DELETE gl FROM int_id2_game_server.game_link gl
    WHERE gl.game_pack_id = 794 AND gl.id NOT IN (
    SELECT * FROM (SELECT parent_id FROM int_id2_game_server.game_link
    WHERE gl2.game_pack_id = 794 AND gl2.parent_id IS NOT NULL)gltemp);

Error shown as SQL Error [1093] [HY000]: You can't specify target table 'gl' for update in FROM clause

Which modification I have to do?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source