adspace
What is set nocount on and what is set nocount off?
Answer Posted / Raj Kumar Vishwakarma
SET NOCOUNT ON and SET NOCOUNT OFF are SQL Server commands used to control the number of times that an explicit message indicating the number of affected rows is displayed during a batch of statements. By default, SQL Server sends a message after every Data Manipulation Language (DML) statement indicating the number of rows affected.nnSET NOCOUNT ON prevents this behavior, while SET NOCOUNT OFF allows it.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
If any stored procedure is encrypted, then can we see its definition in activity monitor?
What are the risks of storing a hibernate-managed object in a cache? How do you overcome the problems?
How can I check that whether automatic statistic update is enabled or not?
Why we use the openxml clause?
How can you append an identity column to a temporary table?
What are wait types?
Is it possible to have clustered index on separate drive from original table location?
This question asked during interview, 2) At the end of each month, a new table is created for each bank that contains monthly metrics consolidated at the account level. The table naming convention is bankX_YYYYMM where X represents the numeric designation of the bank and YYYYMM indicates the 4 digit year and 2 digit month. The tables contain the following fields: name data type description account text account number registered boolean indicates whether the account is registered num_trans integer number of transactions made during the time period spend numeric(9,2) total spend during the time period a) Write a SQL query that will display the total number of transactions and total spend for "Bank1" during the 4th quarter of 2009. b) Write a SQL query that will display the total number of transactions and total spend at "Bank1" and "Bank2", broken out by registered vs. non-registered accounts, during January 2010 not sure what is correct answer and how to solve?
How can we solve concurrency problems?
Can one drop a column from a table?
What is sql server query analyzer?
What are the pros and cons of putting a scalar function in a queries select list or in the where clause?
Why use identity in sql server?
What kind of problems occurs if we do not implement proper locking strategy?
What is the primary use of the model database?