I have a problem while drop temp table. If run below query in 1 time its show error
There is already an object named '#a' in the database.
Please run query in 1 time
if(OBJECT_ID('tempdb..#a','U')Is not null)
Begin
drop table #a
End
Create table #a
(
id int
)
insert into #a
select 1
select * from #a
if(OBJECT_ID('tempdb..#a','U')Is not null)
Begin
drop table #A
End
Create table #a
(
id int
,name varchar(10)
)
insert into #a
select 2,'name'
select * from #A