• 全部
  • 基础类
  • 应用实例
  • 新技术前沿

触发器问题。在线等

smilyvm 2008-03-10 08:21:42
CREATE TRIGGER updatemd ON [dbo].[ckd_detail]
FOR DELETE
AS
update md_table set ck_dh='0',is_select=0,is_ck=0 where md_table.ck_dh=deleted.ck_dh
and md_table.guige=deleted.guige

列前缀 'deleted' 与查询中所用的表名或别名不匹配。
...全文
48 点赞 收藏 6
写回复
6 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
ivan_ren 2008-03-11
CREATE TRIGGER updatemd ON [dbo].[ckd_detail]  
FOR DELETE
AS
update md_table set ck_dh='0',is_select=0,is_ck=0 from deleted,md_table where md_table.ck_dh=deleted.ck_dh
and md_table.guige=deleted.guige
回复
pt1314917 2008-03-10

CREATE TRIGGER updatemd ON [dbo].[ckd_detail]
FOR DELETE
AS
update md_table set ck_dh='0',is_select=0,is_ck=0 from md_table a,deleted b
where a.ck_dh=b.ck_dh and a.guige=b.guige
回复
liangCK 2008-03-10
靠..也太快了吧.
回复
liangCK 2008-03-10
CREATE TRIGGER updatemd ON [dbo].[ckd_detail]  
FOR DELETE
AS
update a
set ck_dh='0',is_select=0,is_ck=0
from md_table a
inner join deleted b
on a.ck_dh=b.ck_dh and a.guige=b.guige
GO
回复
wzy_love_sly 2008-03-10

CREATE TRIGGER updatemd ON [dbo].[ckd_detail] 
FOR DELETE
AS
update md_table set ck_dh='0',is_select=0,is_ck=0
from md_table ,deleted where md_table.ck_dh=deleted.ck_dh
and md_table.guige=deleted.guige
回复
中国风 2008-03-10
CREATE TRIGGER updatemd ON [dbo].[ckd_detail]  
FOR DELETE
AS
update md_table set ck_dh='0',
is_select=0,is_ck=0
from deleted--加上
where md_table.ck_dh=deleted.ck_dh
and md_table.guige=deleted.guige
回复
相关推荐
发帖
MS-SQL Server
创建于2007-09-28

3.3w+

社区成员

MS-SQL Server相关内容讨论专区
申请成为版主
帖子事件
创建了帖子
2008-03-10 08:21
社区公告
暂无公告