STUDY WHILE YOU ARE BORING


  • 首頁

  • 搜索

  • 技术

  • Tags

  • 关于我

SQLServer创建触发器,阻止某个表的记录插入

發表於 October 31, 2018   |   作者: Tim   |   分类: 技术   |   评论

有时候,很多需求真的很奇葩,例如我们在使用某些标准系统(无法自定义或修改)的情况,有些数据不希望按照原有的路径走,那么就只能在数据上动脑筋。
下面这种情况就是这样,某系统 A 每次操作都会产生大量的调试信息插入到调试表(还没地方关闭),非常耗空间。

CREATE TRIGGER trig_af_insert
ON debug_log
AFTER INSERT
AS
Begin
    TRUNCATE TABLE debug_log
End

搞定,从此世界清净多了

SQLServer, Trigger
[Chrome Extension] Domain Bookmark 域名书签
yum安装git-v2.x版本

钜添

56 文章
2 分類
1 页面
GitHub 日记技术
php apache centos macos mysql https shadowsocks mac 微信 ups svn javascript outline accesskey Chrome Extension letsencrypt ssl free certification certbo wildcard renew cloudflare pgsql 归档 binlog isset array_key_exists redmine axure
© 2026 钜添   |   文章 RSS     |  登录
由 Typecho 强力驱动
主題 - NexT
Send message encrypted and private - Msg2
Build your Under Construction Page without hosting - UnderConstruct.IO