select *
into Student..finish
from Student..study
where 1=0
Student.(dbo).finish
因为条件为1=0,是不可能实现的
所以实际上是创建了一个新的表结构而不插入任何数据内容
--清除数据
delete from Student..study
output deleted.*
into Student..finish
where Date<'2012-08-14'
清除数据的语句在同一事务中完成,具有原子性
要么全做要么不做
删除了数据后,会产生一个deleted的临时表,删除的数据内容全部在该表中
由output输出插入新表中
cast(‘123’ as int)——把字符123转为Int型