Not sure I understand your question, but a typical update query is in this format
UPDATE TableName
SET Field1 = 'new Value to set'
WHERE Field2 = 'Value to search upon'
Note the single quotes ('). Those are there to delimit strings. If you are setting or searching for a numeric value, then eliminate the quotes. Only exception to that rule is if you are looking or searching for a date, treat them like strings and surround them with quotes.
In this case you should store the extension of the image, you already know the student code.
There is no need to store the name of the file, as you can combine these easily. Either in the code side, or through a view.
Assuming this is for a web application, to avoid cache issues I would strongly recommend to also store a version with the image, making the final name in the end 0000001v2.jpg etc.
You can set a limit on the number of updates by using the WHERE clause.
For example, at the end of your update query use
WHERE stu_code >= 0000001 AND stu_code <= 0000100
This would update only the records with student codes from 000001 to 0000100