I am stumbled a bit, and cant find what is algorithm to move a node to new parent?

Say we have table with fields id, left, right, level in table catalogue.

And want to move node (and all children of it) with ID=ID to new parent with ID = IDP?

I undersntand that we shall 1stly determine left/right/level values of moving node and parent node. and split algorith for when left of moving node > left of parent, and when it less . But then... ?????????

Sorry for may be poor English. And thanks for help.