t-sql清空表数据的两种方式示例(truncate and delete)
时间:2024-01-20 09:46:24
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
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Python使用psutil获取进程信息的例子
2021-11-03 07:29:47
SqlServer开发神器'SQLPrompt'插件的使用详解
2024-01-23 23:48:55
![](https://img.aspxhome.com/file/2023/1/124851_0s.png)
Python实现桌面翻译工具【新手必学】
2021-03-27 08:32:47
情人节快乐! python绘制漂亮玫瑰
2021-02-07 18:22:48
![](https://img.aspxhome.com/file/2023/5/117985_0s.jpg)
用函数模板,写一个简单高效的 JSON 查询器的方法介绍
2024-04-18 10:53:00
![](https://img.aspxhome.com/file/2023/4/136414_0s.png)
Pyqt实现简易计算器功能
2022-05-10 13:00:51
![](https://img.aspxhome.com/file/2023/8/127538_0s.jpg)
在thinkphp5.0路径中实现去除index.php的方式
2024-05-11 09:54:34
![](https://img.aspxhome.com/file/2023/1/125821_0s.jpg)
Python 编程速成(推荐)
2021-04-03 04:30:10
Go语言开发框架反射机制及常见函数示例详解
2024-02-16 17:23:19
![](https://img.aspxhome.com/file/2023/5/105135_0s.png)
python实现的汉诺塔算法示例
2023-09-21 11:28:17
![](https://img.aspxhome.com/file/2023/1/123551_0s.jpg)
Python数据分析pandas模块用法实例详解
2023-01-25 00:47:29
Python解释器及PyCharm工具安装过程
2021-02-23 08:21:51
![](https://img.aspxhome.com/file/2023/8/118508_0s.jpg)
pygame游戏之旅 添加碰撞效果的方法
2022-11-04 06:45:46
![](https://img.aspxhome.com/file/2023/6/87756_0s.png)
深入剖析Go语言编程中switch语句的使用
2024-02-19 16:50:45
![](https://img.aspxhome.com/file/2023/3/107353_0s.jpg)
09七夕节各大搜索引擎LOGO欣赏
2009-08-27 15:34:00
![](https://img.aspxhome.com/file/UploadPic/20098/27/09-tanabata-festival-search-logo-44s.jpg)
keras 自定义loss损失函数,sample在loss上的加权和metric详解
2021-06-03 08:11:33
sqlserver 查询数据库大小的方法
2012-08-21 10:22:10
python事件驱动event实现详解
2021-07-27 21:17:04
![](https://img.aspxhome.com/file/2023/2/82742_0s.jpg)
pycharm中创建sql文件及模板的过程
2021-10-01 14:50:51
![](https://img.aspxhome.com/file/2023/0/91960_0s.png)
php实现表单多按钮提交action的处理方法
2024-05-11 10:10:27