SQL Server - how to listen for table changes

1k Views Asked by At

In PostgreSQL, I can add a trigger that performs

PERFORM pg_notify('table', 'some data');

to all clients that have performed

LISTEN table;

Is it possible to do something like that in SQL Server?

2

There are 2 best solutions below

0
TheDoomDestroyer On BEST ANSWER

In the end I used SqlTableDependency (Github link) which effectively removes the necessity for writing additional code in the .NET application.

2
LAZER_WAVE On