Check out example codes for "Check if a temporary table exists and delete if it exists". It will help you in understanding the concepts better.

Code Example 1

DROP TABLE IF EXISTS #lu_sensor_name_19 

CREATE TABLE #lu_sensor_name_19...

Code Example 2

IF OBJECT_ID('tempdb..#lu_sensor_name_19') IS NOT NULL 
BEGIN 
    DROP TABLE #lu_sensor_name_19 
END

CREATE TABLE #lu_sensor_name_19...

Learn ReactJs, React Native from akashmittal.com