If you slay an undead creature can you cast animate dead on the corpse to bring it back as a zombie or skeleton?
The 4th-level Sor/Wiz spell animate dead [necro] (Player's Handbook 198—9) says, "This spell turns the bones or bodies of dead creatures into undead skeletons or zombies that follow your spoken commands" (emphasis mine). Also, as this answer says, the spell animate dead parenthetically says, "A destroyed skeleton or zombie can’t be animated again," making it so a lone corpse can't become a zombie repeatedly, for instance, but the question of animating the remains of, for example, a ghoul or wight (ahem) remains.
When reduced to 0 hit points, the typical creature that possesses the type undead (Monster Manual 317) is destroyed. The game never properly defines destroyed, but even if the case is made that dead and destroyed are—I dunno—secretly synonyms, an animated dead creature "can be created only from a mostly intact corpse or skeleton" (199), and I suspect only the most generous DM will rule that a destroyed undead creature's form is mostly intact.
That said, if the DM does rule that a creature that possess the type undead keeps the condition dead upon its destruction and the DM rules that the creature's destruction leaves the resultant corpse largely intact and the creature wasn't previously animated via the spell animate dead, then—finally!—the animate dead spell can be used on that largely intact dead and destroyed and not-previously-animated-by-animate-dead creature… if sticking to the core rules.
Beyond the core rules (like this answer mentions), Libris Mortis on Undead Healing says
What would disable or render unconscious a living creature destroys an undead creature beyond recall. (In game terms, when an undead is reduced to 0 hit points or less, it is permanently destroyed.) No aid, magical or mundane, is sufficient to restore the undead to its previous state of animation. (10)
This makes it clear—outside obvious exceptions like the 5th-level Sor/Wiz spell revive undead [necro] (Spell Compendium 175—6)—that the spell animate dead can't animate a creature that possesses the type undead that's been destroyed.
The animate dead spell can't target a destroyed undead since it only target a dead creature, not a destroyed one (Yes, there is a difference). The Libris Mortis talk about this in details but you can't reanimate an undead that was destroyed (Zombies and skeletons are the main example). The gist of it would be "You can't kill what is already dead, you destroy it."
To make use of a former undead, you should use the Revive Undead spell (Libris Mortis/Spell Compendium).
The answer is definitely not lesser undead, straight from the players handbook.
First paragraph page 199. Yes 3.5e, and 3e and 2e.
This spell turns the bones or bodies of dead creatures into undead skeletons or zombies that follow your spoken commands. The undead can follow you, or they can remain in an area and attack any creature (or just a specific kind of creature) entering the place. They remain animated until they are destroyed. (A destroyed skeleton or zombie can’t be animated again.)
I would also argue a creature that is destroyed has no body. From Wish on page 302
Revive the dead. A wish can bring a dead creature back to life by duplicating a resurrection spell. A wish can revive a dead creature whose body has been destroyed, but the task takes two wishes, one to recreate the body and another to infuse the body with life again. A wish cannot prevent a character who was brought back to life from losing an experience level.
Rules as written, animate dead works on a dead humanoid, not an dead undead. So no.
That said, I and, many DMs chose to ignore this distinction and let people animate anything they can. There are animated undead hands in the monster manual so there is a precedent that you don't even need an intact body.
In conclusion: DM's discretion.