Drop the temp table if exists in tempdb and create table:
IF OBJECT_ID('tempdb..#Results') IS NOT NULL
DROP TABLE #Results
CREATE TABLE #Results
(
Company CHAR(3),
StepId TINYINT,
FieldId TINYINT,
)
Drop temp table using single line code :
DROP TABLE IF Exists #Results
Drop multiple temp tables using single line code :
DROP TABLE IF Exists #TempGPdataStep1,#TempGPdataStep2,#FinalGPDataStep1
No comments:
Post a Comment