create trigger tr_update on a
for update
as
update bb set f=1
from b bb
where exists(
select * from inserted where a=bb.a)
and not exists(
select * from a, inserted i where a.a=i.a and a.c != 1)
for update
as
update bb set f=1
from b bb
where exists(
select * from inserted where a=bb.a)
and not exists(
select * from a, inserted i where a.a=i.a and a.c != 1)
解决方案 »
- sqlserver2000 一个student数据7G,删了90%东西还有5G,请前辈指导是什么原因?
- 求sql command
- 考勤問題
- 想合并两个不相关的两个表的数据,不知道行不?
- 关于查询结果分类和统计的问题。
- 为啥在SqlServer2005中看不到Northwind数据库了?
- 如何写SQL:手机表中编号、型号、品牌三个字段,要求保存时同品牌、同型号的手机的编号自动加1保存
- 我在安装sqlserver2000时安装完成后配置服务器时出现以下错误“无法定位程序输入点??_U@YAPAXI@Z于动态联接库MSVCRT.DLL上”请问该怎样解
- SQL连接问题,急~~~~
- 为什么我的SQL SERVER数据库不能进行备份操作
- 我要从一个表中将100W条数据弄到另一个表中去,有什么快速方法?
- 求简单查询语句
for update
as
update tb set f=1
where a in(select t2.a from inserted t2 where
not exists(select 1 from ta where a=t2.a and b<>123) )go