--存储过程
CREATE PROCEDURE proc_batch_id( out batch_id bigint ) begin
insert into generate_sync_batch (generate_time)values(sysdate());set batch_id = Last_insert_id();
end;
--测试sql
call proc_batch_id (@batch_id);select @batch_id;