• Perhaps this has been already said but in my opinion author makes VERY important FALSE assumption.

    The condition @@ROWCOUNT < table/index/statistic COUNT has NOTHING in common with presence or not WHERE clause in SQL Query.

    Prove: UPDATE Whatever WHERE 1=1

    So, since fundamental assumption of solution is PLAIN WRONG, solution based on it can not be correct.

    It is nice problem workaround, It might work, might work even in most cases, but IMHO correct solution is NOT to allow developer to run untested queries against production server.... Or - retrieve original query text from DMV and test for presence WHERE clause in query text...