sql server临时表是否存在

create table #Left(EmpNo char(6),[hours] float)
--if exists(select * from tempdb..sysobjects where id=object_id('tempdb..#Left')and type='U')
if object_id('tempdb..#Left') is not null
PRINT '存在'
ELSE
PRINT'不存在'
drop table #Left

posted @ 2013-02-06 10:20  自由的企鹅  阅读(301)  评论(0编辑  收藏  举报