DECLARE @cltcode VARCHAR(30) DECLARE @brand VARCHAR(30) select @cltcode=cltcode,@brand=brand from prosamplehd CREATE table #t ( cltcode VARCHAR(30), brand VARCHAR(30) ) INSERT into #t (cltcode ,brand) VALUES (@cltcode ,@brand) select *from #t
解释:
DECLARE 定义变量后
创建临时表,然后insert into 中插入变量的返回值,
年与时驰,意与日去,遂成枯落,
多不接世,悲守穷庐,将复何及。