Ok I got a question concerning triggers in PL/SQL.
I'm able to make a trigger that inserts, updates and deletes in table2 when I do an insert, update or delete on table1. My problem is:
Let's say I have a table with 3 rows and when I insert, update or delete on that table I want another table that include one of those rows to be updated too. I've only managed to "copy" it over if the tables are exactly the same.
When I try to get 1 field over I get a "not enough values" message. What can I do to get around the fact that I send less attributes than there is in the table I want to update?
Here is the script I'm trying to use.
CREATE OR REPLACE TRIGGER Bruker_Insert_Update_Delete
INSERT OR UPDATE OR DELETE ON Bruker
FOR EACH ROW
IF UPDATING THEN UPDATE Kopling
SET BrukerID = :new.BrukerID;
IF INSERTING THEN INSERT INTO Kopling
VALUES( :new.BrukerID );
IF DELETING THEN DELETE FROM Kopling
WHERE BrukerID =