SSMS 中是否有阻止用户运行影响一定数量行的查询的设置?即使它不阻止它,有没有办法弹出一个通知,询问您是否“确定要运行此查询?”?
1 回答
0
您可以有一个触发器并将临时视图作为元数据来引用,但我也不知道 ssms,因为您也标记了 sql
Create view xyz as select * from table
Create Trigger sample before
Update on table
As
samplecount varchar2(20),
samplecount1 varchar2(20);
samplecount=Select count(*) from
table;
Update xyz set........ ;
samplecount1=Select count(*) from
xyz ;
Iif(samplecount1=samplecount)
Then...
Else... End
End
在这里,如果有任何新插入,则上面的内容将起作用,否则将 select count(*)..... 替换为
select sum(case when
somebeforupdateid=someafterupdateid
then
When somebeforeupdatecolumn=
newupdatecolumn then 1 else 0
end
end) and then check totalcount-
sum() = oldcount
于 2019-11-11T17:12:28.400 回答