Update notify change

1

Can you tell if a value has changed in an in-app table?

Type I gave one

UPDATE tabela SET valor = 1 WHERE id = 2;

And in the application the message appears:

O Valor foi alterado para 1

What I would like to do is to notify the client when there is a new system update on the internal network.

I do this, when the system restarts, it automatically updates when the version is different from the current one, but I would like to do this in real-time type, the moment I changed the version in the database to appear on the machines there are new version available.

I thought about creating a procedure , but I have no idea where I can do this.

My System is in Java

    
asked by anonymous 30.06.2017 / 19:00

1 answer

0

You can use a Trigger After Update .

In it you can retrieve the old value and the value through the syntaxes :OLD and :NEW .

With this trigger you can do as you please: insert data into some other table, update some data, and so on.

Here has a reference on how to do a trigger execute a Java code.

    
30.06.2017 / 20:22