if not exists (select * from dbo.sysobjects where id = object_id(N'[IndexTable]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
create table IndexTable(Ex char(20), num integer)
go
create procedure SetIndex @Ex char(20),@result char(30) output,@Fmt integer
as
declare @num char(10)
SET NOCOUNT on
if not exists(select num from indextable where Ex=@ex )
insert into indextable values(@ex,1)
else
update indextable set num=num+1
select @num=cast(num as cha...[ 查看全文 ]