Saturday, 4 February 2017

MSSQL - Fix Error - There is already an object named '#Test' in the database.

Watch this example on YouTube



To fix it replace
Create Table #Test(id int, data varchar(100))

with

IF OBJECT_ID('tempdb..#Test') IS NULL
Create Table #Test(id int, data varchar(100))

No comments:

Post a Comment