Saturday 17 February 2018

MSSQL - execute stored procedure every second but don't display the results

Watch this example on YouTube

while (1=1)
begin
    begin try
        SET FMTONLY ON
        Exec spTest
        SET FMTONLY OFF

        waitfor delay '00:00:01'
    end try
    begin catch
        select 'some error'
    end catch
end

No comments:

Post a Comment