方法一: INSERT INTO fa_dtest (data, formart_id) VALUES ('Some1 data', CONCAT('HS', LPAD(LAST_INSERT_ID(), 5, '0'))); 结果: