How can I get number of deleted records?

That should work fine. The setting of NOCOUNT is irrelevant. This only affects the n rows affected information sent back to the client and has no effect on the workings of @@ROWCOUNT.

Do you have any statements between the two that you have shown? @@ROWCOUNT is reset after every statement so you must retrieve the value immediately with no intervening statements.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)