[Quote=引用 1 楼 rucypli 的回复:]
create proc test
@par varchar(10)
as
if exists (select 1 from tb1 where col1=@par)
update tb1 set col2 = col2 + 1 where col1=@par
else
insert into tb1 values(par,0)
[/Quote]
up
[Quote=引用 1 楼 rucypli 的回复:]
create proc test
@par varchar(10)
as
if exists (select 1 from tb1 where col1=@par)
update tb1 set col2 = col2 + 1 where col1=@par
else
insert into tb1 values(par,0)
[/Quote]
。。。。
create proc test
@par varchar(10)
as
if exists (select 1 from tb1 where col1=@par)
update tb1 set col2 = col2 + 1 where col1=@par
else
insert into tb1 values(par,0)