惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Privacy & Cybersecurity Law Blog
Vercel News
Vercel News
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
N
Netflix TechBlog - Medium
罗磊的独立博客
F
Fortinet All Blogs
T
Threatpost
Y
Y Combinator Blog
博客园_首页
美团技术团队
Security Latest
Security Latest
博客园 - 三生石上(FineUI控件)
T
Tailwind CSS Blog
V
V2EX - 技术
The Cloudflare Blog
L
LINUX DO - 热门话题
博客园 - 司徒正美
Jina AI
Jina AI
P
Proofpoint News Feed
宝玉的分享
宝玉的分享
C
CXSECURITY Database RSS Feed - CXSecurity.com
C
Cybersecurity and Infrastructure Security Agency CISA
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
WordPress大学
WordPress大学
The Hacker News
The Hacker News
P
Privacy International News Feed
T
The Exploit Database - CXSecurity.com
Scott Helme
Scott Helme
有赞技术团队
有赞技术团队
V
V2EX
Stack Overflow Blog
Stack Overflow Blog
M
MIT News - Artificial intelligence
Latest news
Latest news
NISL@THU
NISL@THU
Google DeepMind News
Google DeepMind News
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Cisco Blogs
雷峰网
雷峰网
Application and Cybersecurity Blog
Application and Cybersecurity Blog
B
Blog RSS Feed
W
WeLiveSecurity
D
DataBreaches.Net
G
Google Developers Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
G
GRAHAM CLULEY
Spread Privacy
Spread Privacy
Know Your Adversary
Know Your Adversary
TaoSecurity Blog
TaoSecurity Blog
S
Securelist
Help Net Security
Help Net Security

博客园 - 指南针

EpCloud开发日志 为服务创建安装程序 winform 通过WCF上传Dataset数据 opcrcw.da.dll 和.net 4.0 .net中线程同步的典型场景和问题(1) 如何取消后台线程的执行 python中使用汉字 Ext对基本类型的扩展 OWC ChartSpace控件的使用 OWC PivotTable的使用方法 Sql Server 生成数据透视表 wince5.0 key 修改IP地址后,原来的连接还有存在吗? Window下减少重绘的方法 .Net精简框加下子类化控件 Wince5.0中修改IP地址需不重启即可生效 Extjs combobox Windows workflow中的IEventActivity接口 javascript中的基本数据类型
使MSSql Server 视图可更新
指南针 · 2008-03-10 · via 博客园 - 指南针

1. 创建视图

2. 添加触发器

Create Trigger triggerName On ViewName Instead of Insert --用于Insert操作
as
Begin
    
--在这儿使用Inserted表来获得实际插入的数据,如
    Insert Into baseTable Select f1,f2 From Inserted

End

Create Trigger trigname On ViewName Instead of Update
as 
Begin
    
Set NOCount ON --不报告受影响的行数
    Declare @v1 type,v2 type -- 定义局部变量
    Select @V1=F1,@V2=F2 From Inserted --获取更新的数据
    Update BaseTabe Set F1=@V1,F2=@V2 Where ID=@ID
End

1Create Trigger trigname On ViewName Instead of Delete
2as 
3Begin
4    Set NOCount ON --不报告受影响的行数
5    Declare @ID int
6    Select @ID = ID From Deleted --这儿变成了Deleted表,Inserted表中始终为空。
7    Delete BaseTable Where ID=@ID
8End