You could just concatenate '1' to the beginning of the ID when storing it in the database. When retrieving it, treat it as a string and remove the first char.
MySQL Example:
SET @student_id = '123456789';
INSERT INTO student_table (id,name) VALUES(CONCAT('1',@student_id),'John Smith');
...
SELECT SUBSTRING(id,1) FROM student_table;
Mathematically:
Initially I thought too much and did it mathematically by adding an integer to the student ID, depending on its length (like 1,000,000,000 if it's 9 digits), before storing it.
SET @new_student_id = ABS(@student_id) + POW(10, CHAR_LENGTH(@student_id));
INSERT INTO student_table (id,name) VALUES(@new_student_id,'John Smith');