mercredi 6 mai 2015

Oracle trigger for allowing DML on view

I have View in Oracle DB:

  CREATE VIEW view1
AS SELECT
  id, c1, c2, c3, c4, c5, c6
FROM
  table1
WHERE
  c1>1100 AND c1<2000
WITH CHECK OPTION;

And table table1 with columns id, c1, ... c9. Now i want make trigger(s) on this view for allowing DML operations with data thas is not in this view. But i dont know whitch columns will be updated, whitch rows deleted or inserted. For example

UPDATE view1 SET c1=3000 WHERE c1=1500;

or

INSERT INTO view1 VALUES(3500, .......);

Someone has an idea?

Edit: I know, that doesn't make sense, but this is part of my project and this part will show how to bypass the constraint of view.

Aucun commentaire:

Enregistrer un commentaire