我希望将@a
包含表的整个列的变量与包含单个值的另一个变量进行比较。可能吗?
create procedure pc1(@var int)
as begin
declare @a int
select @a=id from tb1
while(if exists(@var=@a))
begin
select * from tb1 where id=@var
end
return
结尾
我希望将@a
包含表的整个列的变量与包含单个值的另一个变量进行比较。可能吗?
create procedure pc1(@var int)
as begin
declare @a int
select @a=id from tb1
while(if exists(@var=@a))
begin
select * from tb1 where id=@var
end
return
结尾