日期:2014-05-18 浏览次数:20644 次
SELECT @count = [count]
FROM [tt]
WHERE [id] = @id
SELECT @count = [count] , @count2 = [count2]
FROM [tt]
WHERE [id] = @id
declare @T table (id int,count1 int,count2 int) insert into @T select 1,5,4 union all select 2,8,9 declare @id int set @id=1 declare @count int,@count2 int select @count=count1,@count2=count2 from @T where id=@id select @count,@count2 /* 5 4 */
------解决方案--------------------