急急!!!SQL触发器 建立一个触发器,当一个表中的字段被修改时,同时也将另一个表中相应字段也进行更改。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 首先两个表必须有关联关系,设table1,table2通过id关联create trigger trg_tab_upt on table1for updateas update a set a.字段=b.字段 from table2 a join inserted b on a.id=b.id where a.字段!=b.字段 给楼主几个触发器的例子供参考:http://community.csdn.net/Expert/topic/5634/5634833.xml?temp=.6377527http://community.csdn.net/Expert/topic/5635/5635058.xml?temp=.5518457http://community.csdn.net/Expert/topic/5636/5636068.xml?temp=.687649 两个字段是一样的varchar类型,值也一样,但是 where 字段1=字段2,确没记录 关于建表的问题 大数据搜索问题 请教高手COUNT2个值相除问题 老板在叫,我却不知道该怎么办?...各位救救我吧... 用同一个帐号同时在多个客户端登录,和用不同的帐号同时登录有什么区别? 关于SQL SERVER数据库的超莱问题? 大虾,问个SQL语句的问题 sybase12中如何找到SQL ADVANCE 哪里有ORACLE认证考试的培训班 请问如何将存储过程中查询的数据保存入ntext参数中 sql语句判断用户是否是DBA?
for update
as
update a set a.字段=b.字段 from table2 a join inserted b on a.id=b.id where a.字段!=b.字段
http://community.csdn.net/Expert/topic/5634/5634833.xml?temp=.6377527
http://community.csdn.net/Expert/topic/5635/5635058.xml?temp=.5518457
http://community.csdn.net/Expert/topic/5636/5636068.xml?temp=.687649