手机
当前位置:查字典教程网 >编程开发 >mssql数据库 >t-sql清空表数据的两种方式示例(truncate and delete)
t-sql清空表数据的两种方式示例(truncate and delete)
摘要:复制代码代码如下:TRUNCATETABLE(Transact-SQL)Removesallrowsfromatablewithoutlog...

复制代码 代码如下:

TRUNCATE TABLE (Transact-SQL)

Removes all rows from a table without logging the individual row deletions.

TRUNCATE TABLE is similar to the DELETE statement with no WHERE clause;

however, TRUNCATE TABLE is faster and uses fewer system and transaction log resources.

两者的区别在于Truncate快,而且释放日志所占资源,不记录由于删除行的影响所产生的日志。

【t-sql清空表数据的两种方式示例(truncate and delete)】相关文章:

清除SQLServer日志的两种方法

mssql 两种数据插入方式

SQLServer 批量插入数据的两种方法

sql中返回参数的值

Sql Server中的表访问方式Table Scan, Index Scan, Index Seek

SQL2008全部数据导出导入两种方法

SQL2005Express中导入ACCESS数据库的两种方法

sql访问远程数据库

sqlserver 复制表 复制数据库存储过程的方法

SQL2005 ROW_NUMER实现分页的两种常用方式

精品推荐
分类导航