Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 174
  • Last Modified:

SQL Server check for temp table

I need a statement that checks to see if table temp1 exists and if it does exist...delete it.

If not...continue
0
lrbrister
Asked:
lrbrister
1 Solution
 
dqmqCommented:

IF OBJECT_ID('tempdb..#temptable') IS NOT NULL
DROP TABLE #temptable
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now