insert into test
SELECT
CONCAT( SUBSTRING('ABCDEFGHIJKLMNOPQRSTUVWXYZ', c + (idx=9999) - 64,1), SUBSTRING(idx + 10001,2) ),
'valuefield2', 'valuefield3','......'
FROM (
select ASCII('A') as c, 0 as idx union all
select ASCII(LEFT(max(id),1)), RIGHT(max(id),4)*1 FROM test
) as tmp
order by tmp.c desc, tmp.idx desc limit 1