关于声明变量的问题
Declare @T Table(DepId int,InYear int,InWeek int,BookCount int,PenCount int,DeskCount int)
Insert @T Select 1, 2007, 1, 10, 10, 10
Union All Select 1, 2007, 2, 11, 11, 11
Union All Select 1, 2007, 3, 12, 12, 12
Union All Select 2, 2007, 1, 10, 10, 10
Union All Select 2, 2007, 2, 11, 11, 11
Union All Select 2, 2007, 3, 12, 12, 12
对上面的语句有些疑问
它用declare 声明了变量@T 可是后面跟的不是一个类型,而是一个表,这是怎么回事?
如果要是查询@T里的内容怎么写语句,难道是用from @T 吗?