Problema:
Ho Tab1 e Tab2
Voglio cancellare le righe di Tab1 che non hanno un legame con la Tab2 ( questo legame è un codice che è presente in entrambe tabelle)
Ho fatto questo statement ma mi dà errore:
"you can't specify target table "tab1" for update in form clause"

Vi posto la query:
delete from tab1
where codice NOT IN ( select codice from tab1
INNER JOIN tab2
ON
(tab1.codice = tab2.codice2))
Ho provato logicamente anche:
delete tab1 from tab1
where codice NOT IN ( select codice from tab1
INNER JOIN tab2
ON
(tab1.codice = tab2.codice2))
ma sempre errore...
ho bisogno forse di un alias per le tabelle?.,,.,.attendo il vostro aiuto
Grazie