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
Post a Comment