34,594
社区成员
发帖
与我相关
我的任务
分享
declare @a table (id int)
insert into @a select 1
insert into @a select 3
declare @b table (id int)
insert into @b select 1
insert into @b select 2
insert into @b select 3
declare @counta int,@countb int
select @counta=count(1) from @a
select @countb=count(1) from @b b where exists(select 1 from @a where id=b.id)
if @counta=@countb
print '全部包括'
else
print '不全部包括'