How to determine if a SQL temp table exists

by Andrew Jackson 12. September 2009 04:55
IF OBJECT_ID('tempdb..#some_temp_name') IS NOT NULL
PRINT '#some_temp_name exists.'
ELSE
PRINT '#some_temp_name does not exist.'

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Development | SQL

Comments are closed

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

About Me

Andrew Jackson

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2008,2009 Andrew K. Jackson

RecentComments

Comment RSS