如何在sql>中运行以下查询?在Oracle 11g R2 SE中提示
CREATE TRIGGER "ICD".TR_DEL_SYSTEMALERTCFG_CSTLVL
after delete on t_custlevel
begin
delete t_monitor_systemalertcfg a
where a.queuetype = 4
and a.queueid not in (
select b.id from t_custlevel b
where a.subccno = b.subccno
and a.vdn = b.vdn
);
end TR_DEL_SYSTEMALERTCFG_CSTLVL;
请建议。
由于
Kaushal
答案 0 :(得分:1)
cd
命令)。sqlplus
命令以连接数据库。@my_query.sql
以执行查询文件。答案 1 :(得分:0)
如果您想自动退出sql
,请在结尾处添加斜杠并退出CREATE TRIGGER "ICD".TR_DEL_SYSTEMALERTCFG_CSTLVL
after delete on t_custlevel
begin
delete t_monitor_systemalertcfg a
where a.queuetype = 4
and a.queueid not in (
select b.id from t_custlevel b
where a.subccno = b.subccno
and a.vdn = b.vdn
);
end TR_DEL_SYSTEMALERTCFG_CSTLVL;
/
exit
BTW:你没有以root用户身份在数据库服务器上运行sqlplus,是吗?