创建一触发器,当删除Reader表中读者的信息时,同时删除Borrow表中该读者的记录。 用SQL语句
3个回答
展开全部
1楼的,别人是删除啦
create trigger 触发器名称
on reader
for delete
as
delete * from borrow where borrower.读者ID = deleted.读者ID
create trigger 触发器名称
on reader
for delete
as
delete * from borrow where borrower.读者ID = deleted.读者ID
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
create trigger 触发器名称
on Reader
for Instead of delete
as
delte * from borrow where borrow.字段名=instead.关联字段名
on Reader
for Instead of delete
as
delte * from borrow where borrow.字段名=instead.关联字段名
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
oracle的
create or replace trigger 触发器名称
after delete on reader
for each row
begin
delete from borrow where borrower.读者ID = :old.读者id;
dbms_output.put_line('读者信息已删除');
end 触发器名称;
create or replace trigger 触发器名称
after delete on reader
for each row
begin
delete from borrow where borrower.读者ID = :old.读者id;
dbms_output.put_line('读者信息已删除');
end 触发器名称;
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询