What is the best way to drop a table? The code I have does it two different ways. It will be dropped every week when I do a bulk insert. Thanks.
Like this?
IF EXISTS (SELECT *
FROM DBO.SYSOBJECTS
WHERE ID = OBJECT_ID(N'[DBO].[ZIP]') AND OBJECTPROPERTY(ID, N'IsUserTable') = 1)
DROP TABLE [DBO].[ZIP]
Or this?
DROP TABLE DEID.DBO.ZIP