CREATE RULE ObnovHodnePlacenaOddeleni1 ON Zam WHEN INSERTED, DELETED, UPDATED(CisloOdd), UPDATED(Plat) THEN DELETE * FROM HodnePlacenaOddeleni; INSERT INTO HodnePlacenaOddeleni: (SELECT DISTINCT Odd.Jmeno FROM Odd, Zam WHERE Odd.CisloOdd = Zam.CisloOdd AND Zam.Plat > 100K ) CREATE RULE ObnovHodnePlacenaOddeleni2 ON Odd WHEN INSERTED, DELETED, UPDATED(CisloOdd) THEN DELETE * FROM HodnePlacenaOddeleni; INSERT INTO HodnePlacenaOddeleni: (SELECT DISTINCT Odd.Jmeno FROM Odd, Zam WHERE Odd.CisloOdd = Zam.CisloOdd AND Zam.Plat > 100K)
{}