Multiple choice technology databases

when you execute a T-SQL statement (INSERT, UPDATE, SELECT, DELETE) in a new query window, you see a message that says how many rows affected in the result window. How to disable this?

  1. SET NOCOUNT OFF

  2. SET XACT_ABORT ON

  3. SET NOCOUNT ON

  4. SET XACT_ABORT OFF

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

SET NOCOUNT ON disables the message showing the number of rows affected by T-SQL statements. This is the same question as 154415, testing the same concept. Option A (OFF) would enable the messages, Option B/D relate to XACT_ABORT which controls transaction behavior on errors, not row count messages.