CREATE OR REPLACE TRIGGER tri_vreserve
AFTER UPDATE OF vreserve14 ON pm_pa_payapply
DECLARE
myexp exception
BEGIN
IF old.vreserve14 != '' AND new.vreserve14 == '' THEN
RAISE myexp;
END IF;
EXCEPTION_INIT
WHEN myexp THEN raise_application_error('-20002','vreserve14字段的值被设置为空');
END;
oracle查询表是否有触发器
select trigger_name from all_triggers where table_name='PM_PA_PAYAPPLY';
通过触发器名,获取触发器的具体内容
select text from all_source where type='TRIGGER' AND name='TRI_VRESERVE';
注意触发器名要大写。