I believe the T-SQL language could benefit from assertions, perhaps declared using an new ASSERT clause. For example, the following query would abort with an error when the actual rowcount exceeded 1000.
SELECT A, B, C
WHERE X = 10
ASSERT (MAXROWS = 1000);
Assertions could also be created on DML operations. For example the following UPDATE contains an obvious bug, and when executed would immediately abort and rollback with an error explaining that number of rows affected 1,488,721 exceeded the assertion.
SET Balance = 0, PostDate = GETDATE()
WHERE @AccountNumber = @AccountNumber
ASSERT (MINROWS=1, MAXROWS=1);
"Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho