if exists(select top 1 1 from sys.tables where name = '#table1')
drop table #table1
create table #table1(id int)
if exists(select top 1 1 from sys.tables where name = '#table1')
drop table #table1
create table #table1(id int)
select * from #table1
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Salman BegRank #284 · 8.8K reputationPosted Aug 31, 2020, 4:52 AM EDT
Vinay TalapaneniRank #6,081 · 277 reputationPosted Aug 31, 2020, 5:27 AM EDT
Salman BegRank #284 · 8.8K reputationPosted Aug 31, 2020, 6:00 AM EDT
Vinay TalapaneniRank #6,081 · 277 reputationPosted Aug 31, 2020, 6:44 AM EDT
Laxmidhar SahooRank #383 · 6.6K reputationPosted Sep 1, 2020, 12:04 AM EDT