MS SQL Tips & Tricks

How to check if temporary table exists

To test existence of temporary table we have to use OBJCECT_ID function that gives us ID of the object or NULL if object does not exist. We have to remeber that temporary table are always placed on tempdb database.

IF OBJECT_ID('tempdb..#temp') IS NOT NULL
 begin
  drop table #temp
 end

Learn more tricks

Add Comment

Comments

30th August 2021

On Line Erectile Dysfunction Medication

Viagra

31st August 2021

cialis buy online

AwasmaB

8th September 2021

Propecia

Gursefs

8th September 2021

Can I Buy Prozac Online

purchase cialis online

16th September 2021

Priligy

Luhteerge