MySQL Forums
Forum List  »  Italian

Delete from multiple tables using Inner Join
Posted by: daniele martini
Date: August 09, 2017 04:58AM

Salve a tutti, sto cercando di cancellare degli elementi presenti in due tabelle con una query SQL. Di seguito la query:

DELETE categorie.id, costi.id FROM categorie INNER JOIN costi WHERE categorie.id= 61

Il problema è il seguente errore che mi viene restituito:
Static analysis:

2 errors were found during analysis.

Unexpected keyword. (near "INNER JOIN" at position 45)
Unrecognized statement type. (near "INNER JOIN" at position 45)
SQL query:

DELETE categorie.id, costi.id FROM categorie INNER JOIN costi WHERE categorie.id= 61

MySQL said: Documentation

#1109 - Unknown table 'id' in MULTI DELETE

Cosa sto sbagliando? Ho visto su diversi forum che la gente usa questa sintassi per eliminare dati presenti in più tabelle.

Options: ReplyQuote


Subject
Views
Written By
Posted
Delete from multiple tables using Inner Join
391
August 09, 2017 04:58AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.