Instead of checking temporary table existence like this:
IF OBJECT_ID('tempdb..#table') IS NOT NULL
BEGIN;
DROP TABLE #table;
END;
I am using the new DROP IF EXISTS
technique:
DROP TABLE IF EXISTS tempdb..#table;
It is working perfectly, but if the table do not exists, I am getting the following message.
Database name 'tempdb' ignored, referencing object in tempdb.
Does anyone know why and what this message mean?