34,590
社区成员
发帖
与我相关
我的任务
分享
declare @d varchar(10)
?
if exists(SELECT 1 form t where a=1 AND b=2)
update t ...
else
insert into t ...
declare @d varchar(10)
select @d=d from t where a=1 and b=2
if @d is not null
update t
else
insert into t
if exists(select 1 from t where a=1 and b=2)
update t
else
insert into t..