[MSSQL] 判斷TABLE是否存在

  • 6550
  • 0
  • 2013-04-11

...


IF EXISTS(SELECT 1 FROM sys.sysobjects WHERE name='TABLE')
	DROP TABLE TABLE
	
IF OBJECT_ID('tempdb..#TABLE') IS NOT NULL 
	DROP TABLE #TABLE