Anything that does enough damage to the corpse to get it “pulped” will prevent it from raising, so enough overkill can do it, fire should be enough (though just setting it on fire doesn’t do it), smashing can do it, acid can do it, too.
Enough damage destroys the corpse… but smashing won’t do it, unfortunately, because I’m pretty sure necromancers can raise them, very annoying.