SQL中的TABLE类型的变量怎么用?

用于什么情况?
declare @x table
select @x=*from a
print @x

为什么会错呢?谢谢!

declare @x table(col int)
insert into @x values(1)
select * from @x

这就相当于一张临时表
温馨提示:答案为网友推荐,仅供参考
相似回答