servo with relay

Could someone please tell me whether it is possible to use an SPST relay to power on/off a servomotor via code? If so do I need to include a transistor along with the relay?

Thanks

Yes. It is possible.
You will need a transistor to turn relay ON/OFF
The money question : why would you like to turn a servo off ??
I smell TheXYproblem.

-Malhar

Yes the real answer is you don't want to do this. If you think you do then you are misunderstanding something.

Deja vu’s strong with this one.