Hi,
I have a question as to why this syntax is wrong:
IF OBJECT_ID('tempdb..##Columns') IS NOT NULL
DROP TABLE tempdb..##Columns
Error:
Database name 'tempdb' ignored, referencing object in tempdb.
But this is right:
IF OBJECT_ID('tempdb..##Columns') IS NOT NULL
DROP TABLE ##Columns -- can't reference tempdb?
Seems that one should reference the "tempdb" qualifier when dropping the table?
Thanks
I have a question as to why this syntax is wrong:
IF OBJECT_ID('tempdb..##Columns') IS NOT NULL
DROP TABLE tempdb..##Columns
Error:
Database name 'tempdb' ignored, referencing object in tempdb.
But this is right:
IF OBJECT_ID('tempdb..##Columns') IS NOT NULL
DROP TABLE ##Columns -- can't reference tempdb?
Seems that one should reference the "tempdb" qualifier when dropping the table?
Thanks