DO $$ 
    BEGIN
          IF EXISTS (SELECT "Id" FROM public."Versions" WHERE "Build">=2316) THEN
		RETURN;
          END IF;
        BEGIN
 

           DELETE FROM public."EmailLabels" where "OwnerId"  is null;

        EXCEPTION
            WHEN OTHERS THEN RAISE NOTICE 'DELETE with null ownerId <EmailLabels> error.';
        END;
    END;
$$

