Reputation: 21
CREATE OR REPLACE TRIGGER HOP
BEFORE DELETE ON VILLE
FOR EACH ROW
BEGIN
IF DELETING THEN
RAISE_APPLICATION_ERROR(-20001,"immposible de supprimer");
END IF;
END;
/
Hi,I want to create trigger that refuses to delete a city but i get this error: 'immposible de supprimer' must be declared
Upvotes: 0
Views: 123
Reputation: 156998
In Oracle, some text between "
denotes an identifier, the name of a table or a field for example.
You should use '
, which denotes a string
literal:
RAISE_APPLICATION_ERROR(-20001, 'immposible de supprimer');
Upvotes: 2
Reputation: 4551
You have surrounded a text string with double quotes. Oracle thinks you are referring to a database object. Change the double quotes to single quotes.
Upvotes: 2