我需要按条件生成不同内容但名字相同的临时表
如:
if @login=true
select * into #abcd from syspara where code='01'
else
select * into #abcd from syspara where code='02'
但在创建过程的时候提示#abcd已经存在的错误,过程不能创建
这如何是好
...全文
5113打赏收藏
创建临时表的语句不能写两次,怎么办?
我需要按条件生成不同内容但名字相同的临时表 如: if @login=true select * into #abcd from syspara where code='01' else select * into #abcd from syspara where code='02' 但在创建过程的时候提示#abcd已经存在的错误,过程不能创建 这如何是好