tags:

views:

31

answers:

1

I have a Users table and a Totals table which has an integer field for the total number of users. I thought about writing a console app that counts the Users table and then updates the Totals table. And then make a Task scheduler events that executes this app every 10 minutes. Is there a more elegant way to do this?

+1  A: 

Make the Totals table a view, so it doesn't need to be updated at all?

or ...

Update the Totals table with ON INSERT triggers on the Users table?

Borealid
This is exactly what triggers were made for.
SeaDrive