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 中插入变量的返回值, 

 

相关文章:

  • 2021-05-21
  • 2021-09-21
  • 2022-12-23
  • 2022-01-02
猜你喜欢
  • 2021-05-19
  • 2022-12-23
  • 2022-12-23
  • 2021-07-22
  • 2022-01-05
  • 2021-10-17
  • 2021-07-31
相关资源
相似解决方案