truncate table tablename
delete from tablename
delete方法最大的问题,当有标志字段时就有问题
===问:需要清空数据库里所有的表
首先sysobjects表里查询语句:select name from sysobjects where xtype='u'
表sysobjects见《SQL Server中各个系统表的作用》
转载于:https://www.cnblogs.com/Sue_/articles/1653504.html