56,912
社区成员




create table cfg_nextId (
tableName varchar(128),
nextId varchar(32)
);
create procedure proc_getNextId ( @tableName varchar(128), @nextId varchar(32) output )
as begin
select @nextId = nextId from cfg_nextId where tableName = @tableName;
update cfg_nextId set nextId = nextId+1 -- 或其他方法
where tableName = @tableName;
end;