方法一:
if object_id('tableName') is not null
drop table tableName
若为临时表,则指定临时数据库tempdb前缀
if object_id('tempdb..#DataIn') is not null
drop table #DataIn
方法二:
if exists (select * from sysobjects where id = object_id('tempdb..#DataIn') and type='U')
drop table #DataIn