Skip to content
Advertisement

Specified Twice Table for ‘DELETE’ in MariaDB

I created a query to delete some record in MariaDB

Query :

Result :

Table ‘HrAttLogsFormatted’ is specified twice, both as a target for ‘DELETE’ and as a separate surce for data

But with the query I made unsuccessfully, is there a way to solve it?

Thank you in advance

[EDIT-SOLVED] It’s Solved with simply apply and query

Advertisement

Answer

I would try writing this as a delete join:

If you really wanted to stick with your current query, you might be able to make it work by adding an additional subquery around the WHERE IN clause:

But, I would use the version I gave, because it is simpler.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement