sql >> Base de Datos >  >> RDS >> Mysql

¿Manera elegante de eliminar filas huérfanas?

delete from history_table where customer_id not in (select customer_id from customers)

¿Quisiste decir algo como esto?