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 -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -