我想在emp.sal < 10
.
CREATE OR REPLACE TRIGGER sal_more_than_ten_trigger
BEFORE INSERT OR UPDATE ON emp FOR EACH ROW
DECLARE
sal_lease_than_ten_error EXCEPTION;
BEGIN
IF new.sal < 10 THEN -- error occured!!!!!!!!!!!!!!!!!!!!!!!!!
RAISE sal_lease_than_ten_error;
END IF;
EXCEPTION
WHEN sal_lease_than_ten_error THEN
RAISE_APPLICATION_ERROR(-20001, 'give me more');
END;
/
我如何比较 newemp.sal
与10
?