57,065
社区成员
发帖
与我相关
我的任务
分享
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;