delete from TheTable with(TABLOCK) where answerTime between @DataTime3 and @DataTime4
-------释放磁盘空间------------
declare @table nvarchar(50),@fileid int
set @table = 'MyDB'
set @fileid = 1
dump transaction @table with no_log
backup log @table with no_log
dbcc shrinkfile(@fileid)
set @fileid = 2
dump transaction @table with no_log
backup log @table with no_log
dbcc shrinkfile(@fileid)
GO