Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE OR REPLACE TRIGGER "T_CONST_TIERRA"
- BEFORE INSERT
- ON ELEMENTO
- FOR EACH ROW
- WHEN (NEW.tipo='C') DECLARE
- temp VARCHAR2(30);
- BEGIN
- SELECT pos.terreno INTO temp
- FROM posicion pos
- WHERE (pos.x=:NEW.x) AND (pos.y=:NEW.y);
- IF temp <> 'T' THEN raise_application_error(-20100, 'Se debe construir sobre tierra');
- END IF;
- END;
Advertisement
Add Comment
Please, Sign In to add comment