Here's how one could work, which will only mine downward, useful for digging through a pool of water or magma, or for a 1x1 shaft (for some reason)
| <- drill shaft
|
|
|
|
|
[|] <- this provides rotation, needs to be hooked up to power source, does not move
|
|
|
|
\/ <- drill bit, moves down with shaft
So you'd have to build all the shaft pieces and a drill head, and drag them over to the rotating piece to assemble the drill. As the drill goes through the layers, gravity pushes the shaft down another level. Maybe you'd need a cap piece at the top, to prevent the thing from just falling out of the rotator piece at the end.
Once you've dug your hole, the dwarves pull the drill up and dissassemble it piece by piece. It could also be run manually, like a pump, with a dwarf at the rotator piece.
It's way less efficient than just using dwarves, but useful for digging through water/magma/open spaces, for example, to dig down to cavern water for a well. Can a magma forge be powered by magma more than 1z level down? For !!FUN!! purposes, it could also be used to drill creatures... Take that, stupid bronze collosus...
I suppose a horizontal version could work, but then you'd need something pushing on it, since gravity wouldn't be helping you.