I am running below script where I am deleting those records having IDs not present in one of two tables.
IF OBJECT_ID(\'tempdb..#tempTable\') IS NOT NULL DROP