How can I select the next available row id of varchar type in MySQL?
SELECT id AS next_id FROM your_table WHERE id &gt; @current_id ORDER BY id LIMIT 1


Breaking that down:

SELECT id AS next_id FROM your_table


that bit is hopefully obvious

WHERE id &gt; @current_id 


you don't want the current value or anything before it

ORDER BY id 


in the output, list earlier ID values first

LIMIT 1


we only want one of them so no point going further once one has been ready from the table.

As an aside: is there a any particular reason why you are using a character field as the ID instead of a numeric one which would be more efficient?