How to check whether local temp tables exist or not?

 Posted by vishalneeraj-24503 on 11/3/2014 | Category: Sql Server Interview questions | Views: 252 | Points: 40
Answer:

We have to write tempdb.. followed by Table name in object_id as:-
if(object_id('tempdb..#Employee') is not null)

Print 'Present';


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response