sql server 删除表

USE AdventureWorks2008R2;
GO
CREATE TABLE #temptable (col1 int);
GO
INSERT INTO #temptable
VALUES (10);
GO
SELECT * FROM #temptable;
GO
IF OBJECT_ID(N'tempdb..#temptable', N'U') IS NOT NULL
DROP TABLE #temptable;
GO
--Test the drop.
SELECT * FROM #temptable;

posted @ 2011-10-31 10:59  野三坡  阅读(194)  评论(0编辑  收藏  举报