局部临时表

declare @test table(
id int,
name varchar(100)
)
insert into @test(id,name)
select ID,LastName from tb_OrderUserInfo where DATEDIFF(M,InTime,GETDATE())<3
select * from @test

posted @ 2011-12-27 10:24  放哨De老鼠  阅读(212)  评论(0编辑  收藏  举报