You will have to trigger the trigger whenever there is a change in the table.
Below is an example in SQL:
--criei a tabela cliente
CREATE TABLE CLIENTE (
ID INT PRIMARY KEY IDENTITY,
NOME VARCHAR (250),
BLOQUEADO VARCHAR (1),
REDE VARCHAR (20)
)
Below insert into client table with NETWORK 1 and NETWORK 2
INSERT INTO CLIENTE (NOME,BLOQUEADO,REDE) VALUES
('CLIENTE1REDE1', 'N', 'REDE1'),
('CLIENTE2REDE1', 'N', 'REDE1'),
('CLIENTE3REDE1', 'N', 'REDE1'),
('CLIENTE4REDE1', 'N', 'REDE1'),
('CLIENTE5REDE1', 'N', 'REDE1'),
('CLIENTE6REDE1', 'N', 'REDE1'),
('CLIENTE7REDE1', 'N', 'REDE1'),
('CLIENTE8REDE1', 'N', 'REDE1'),
('CLIENTE9REDE2', 'N', 'REDE2'),
('CLIENTE1REDE2', 'N', 'REDE2'),
('CLIENTE2REDE2', 'N', 'REDE2'),
('CLIENTE3REDE2', 'N', 'REDE2'),
('CLIENTE4REDE2', 'N', 'REDE2'),
('CLIENTE5REDE2', 'N', 'REDE2'),
('CLIENTE6REDE2', 'N', 'REDE2'),
('CLIENTE7REDE2', 'N', 'REDE2'),
('CLIENTE8REDE2', 'N', 'REDE2'),
('CLIENTE9REDE2', 'N', 'REDE2');
Then I create the trigger
CREATE TRIGGER [dbo].[ATUALIZA_BLOQUEIO]
ON [dbo].[CLIENTE]
FOR UPDATE
AS
BEGIN
DECLARE
@ID INT,
@BLOQUEADO VARCHAR (1),
@REDE VARCHAR(20)
SELECT @ID = ID, @REDE = REDE, @BLOQUEADO = BLOQUEADO FROM inserted
--Verifico se o valor do cliente que foi alterado esta
--como bloqueado, caso esteja repasso para os demais
--clientes da mesma rede
IF (@BLOQUEADO = 'S')
BEGIN
UPDATE CLIENTE SET BLOQUEADO = 'S' WHERE REDE = @REDE
END
END
I make an update on a test specific client
UPDATE CLIENTE SET BLOQUEADO = 'S' WHERE NOME = 'CLIENTE8REDE2'
I make the select to check (see that you have changed all clients on network 2)
SELECT * FROM CLIENTE
I hope to help
Note: In oracle you can change the trigger creation dynamics a bit, but only a little bit of the syntax.