sql server - How to silently insert values into temporary table? -


i have sql script needs set values in temporary table.

-- beginning of script  declare @codes table(code nvarchar(8) primary key not null) insert @codes values ('abc'), ('feghj')  -- many more instructions -- ..... 

when execute in sql server management studio, causes output :

(2 row(s) affected)

however, don't want users believe @ point has been changed in db.

can prevent insert output ? if yes, how ?

use set nocount on when turned on count not returned

here microsoft documentation if fancy read it


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

Qt QGraphicsScene is not accessable from QGraphicsView (on Qt 5.6.1) -

What is happening when Matlab is starting a "parallel pool"? -