How to prevent messages about the number of rows affected by your SQL Statement in SQL SERVER 2019.

How to prevent messages about the number of rows affected by your SQL Statement in SQL SERVER 2019.

Software Nuggets

2 года назад

786 Просмотров

This is a quick video on a SET Statement feature that will suppress the result (1 row affected) when executing sql statements.

How to prevent messages about the number of rows affected by your SQL Statement in SQL SERVER 2019.

How to use SET NOCOUNT ON;
How to use SET NOCOUNT OFF;

When the state is ON, the count is not returned.
When the state is OFF, the count is shown.

Setting NOCOUNT ON, can provide some serious performance. Screen output is very expensive.

What is @@OPTIONS & 512

Select @@OPTIONS & 512 (if results = 512) then NOCOUNT is ON


------------------------------------------------------*****------------------------------------------------------------
I would appreciate if you could leave a message for other students to read, a thumbs up if you learned something new and enjoyed the video, and please consider subscribing to this channel. Thank you in advance for your consideration.

Let's help each other!
------------------------------------------------------*****------------------------------------------------------------

-- by : software nuggets
-- is a : sql server nugget

Тэги:

#set_nocount_off #set_nocount_on #How_to_use_SET_NOCOUNT_ON #When_the_state_is_OFF #stop_showing_affected_count #message_that_shows_the_count_of_rows_affected #number_of_rows_affected #turn_off_sql_server_affected_message #affected_message #suppress_results_in_query_windows #suppress_affected_rows_in_query_result_window #What_is_@@OPTIONS #what_is_@@options_&_512 #software_nuggets #nuggets
Ссылки и html тэги не поддерживаются


Комментарии: