SQL code 1.if object_id('tableName') is not null drop table tableName 2.if exists (select * from sysobjects where type='u' and name='tablename') drop table tablename 第一种方法是利用了数据库系统提公的函数来判断,这往往是最正规的方法。一般在建表之前都会加上这一段代码。 第二种方法是你自己从数据库的系统表中查找这个表,看看是不是存在。这种方式是你自己实现了上面的函数而已。 两种方法都是可行的。