Add spells to a trainer NPC with commands

Hi, I would like to know if is it possible to add spells to a trainer NPC only with in-game commands?

If yes, could you tell me how can I do that?

Thanks.

Afaik, no.