devo svuotare delle tabelle che però sono legate ad altre tramite FK.
ad esempio devo svuotare la tabella pacchetti e quella articoli che sono legate.
in articoli c'è un FK che la lega a pacchetti.
come posso svuotare queste tabelle?
se provo a svuotare pacchetti mi esce questo errore:
codice:
mysql> truncate pacchetti;
ERROR 1701 (42000): Cannot truncate a table referenced in a foreign key constraint (`compagnia`.`articoli`, CONSTRAINT `pacchetto_codice_FK` FOREIGN KEY (`pacchetto_codice`) REFERENCES `compagnia`.`pacchetti` (`pacchetto_codice`))