I\'m trying to delete records from one database based on a selection criteria of another. We have two tables, emailNotification which stores a list of jobs and emails. Then
You could try something like the following:
DELETE FROM emailNotification WHERE jobId IN ( SELECT jobId FROM jobs j WHERE j.active = 1 )