SQL学习记录:定义(一)

--1.在这里@temp是一个表变量,只有一个批处理中有效,
declare @temp table; 

--2. 如果前面加#就是临时表,可以在tempDB中查看到,它会在最后一个使用它的用户退出后才失效,所以用完一般要drop掉
declare #temp table;
drop talbe #temp;

原文地址:https://www.cnblogs.com/fengduandeai/p/8797657.html