sql server - Drop temp table if it exists on SQL Azure -


is there better way drop temp table on azure sql?

begin try     drop table #custommap end try begin catch end catch 

maybe there no need drop temp tables on azure sql since tables dropped when session ended.

this

if (object_id('#candidates')) not null begin     drop table #candidates; end; 

or this

if (object_id('tempdb..#candidates')) not null begin     drop table #candidates; end; 

does not work.

in azure sql database can use drop if exists (die) syntax:

create table #temp (id int)  drop table if exists #temp 

Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -