Search code examples
sqlsql-serverstored-procedurestimer

How to execute stored procedure after every 5 seconds?


I am making a stored procedure, I want to make it auto executable after every 5 seconds.

I tried "WAITFOR DELAY '00:00:05';" but didn't fulfill my need.

WAITFOR DELAY '00:00:05'

I want one output result i.e one output table, not all previous results.


Solution

  • Use SQL Server Agent and create a job and schedule it to run every 5 seconds