Is it possible to terminate an executing query and return a specific value (e.g return value = 1
) if a SQL query runs for longer than X seconds?
Could you please give a concrete example with a basic query. For example in SQL:
select * from test
If this query is taking more than 10 seconds to execute, it should return: 1 as the result.
I am using SQL management studio.