Just use the MOD function with specifying 1 then after it the number of zeros upon which the number of digits you want , for example :
UPDATE Doctors
SET id = MOD(id,10); // here I got the last digit as the number of zeros is one
SET id = MOD(id,100);// here I got the last 2 digits as the number of zeros is two