INSTEAD OF触发器(FOR EACH ROW) [英] INSTEAD OF trigger (FOR EACH ROW)

查看:128
本文介绍了INSTEAD OF触发器(FOR EACH ROW)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题是理解我读到的概念jus给出了代码片段

< span class =codeLinkonclick =Blur(this,this.parentNode.parentNode,getChildren(this),true);>展开 | 选择 | Wrap | 行号

解决方案

为什么需要更新表中已存在的相同值的值?


如果存储在工作表中的名称是='' AAAA''并且您尝试更新名称归档为''AAAA''然后您认为此更新真的有意义吗?

IF条件只是检查该字段是更新没有价值类似于要更新的​​新值。


我希望这清除你的怀疑!!


先生但是

说我有三个名字ramya jyothi和bart的记录。

现在我必须改变只有巴特。因为我的更新是

更新工人设置位置=''bangalore''其中​​name =''bart'';

所以我不应该改变前两个记录名称ramya和jyothi

这个特别的疑问我不清楚。请尽量帮助我


为什么你需要更新一个具有相同值的值表格中已经存在的内容??


如果工作表中存储的名称='''AAAA''并且您尝试更新名称归档为''AAAA' ''那么你认为这个更新真的有意义吗?

IF条件只是检查要更新的字段没有类似于要更新的​​新值的值。 />

我希望这能解决你的疑问!


sir in UPDATE WORKER set lodging =''bangalore''name name =''bart''

现在请告诉我已经住过一张桌子了。

新住宿是banaglore。

现在像这样我有旧名称bart再次出现在桌子上。

我可以有一个新名字。因为名字在where条件中

例子在INSERT中没有旧值,在DELETE中没有新值
< blockquote class =post_quotes>
先生,但

说我有三个名字ramya jyothi和bart的记录。

现在我只需要改变一下巴特。因为我的更新是

更新工人设置位置=''bangalore''其中​​name =''bart'';

所以我不应该改变前两个记录名称ramya和jyothi

这个特别的疑问我不清楚。请尽量帮助我


i have a problem in understanding the concept which i read ill jus give the snippet code

Expand|Select|Wrap|Line Numbers

解决方案

Why you need to update a value with a same value which already exist in the table??

If the name stored in the worked table is = ''AAAA'' and you try to do an update of name filed to value ''AAAA'' then do you think this update makes sense really?
The IF condition is just to check that the field to be updated does not have the value similar to the new value to be updated to.

I hope this clears your doubt!!


sir but
say i have three records with names ramya jyothi and bart.
now i have to make a change in only bart. because my update is
update worker set location=''bangalore'' where name=''bart'';
so i should not change the first two record names ramya and jyothi
this particular doubt iam not clear with.please try to help me

Why you need to update a value with a same value which already exist in the table??

If the name stored in the worked table is = ''AAAA'' and you try to do an update of name filed to value ''AAAA'' then do you think this update makes sense really?
The IF condition is just to check that the field to be updated does not have the value similar to the new value to be updated to.

I hope this clears your doubt!!


sir in UPDATE WORKER set lodging=''bangalore'' where name=''bart''
now please tell me old lodging is one present in the table already
new lodging is banaglore.
now like this i have old name as bart which is the present in the table again.
can i have a new name.because name is in the where condition
example in INSERT there is no old value ,in DELETE there is no new value

sir but
say i have three records with names ramya jyothi and bart.
now i have to make a change in only bart. because my update is
update worker set location=''bangalore'' where name=''bart'';
so i should not change the first two record names ramya and jyothi
this particular doubt iam not clear with.please try to help me


这篇关于INSTEAD OF触发器(FOR EACH ROW)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆