Re: SET NOCOUNT ON OPTION
From: Adam Machanic (amachanic_at_hotmail._removetoemail_.com)
Date: 10/19/04
- Next message: Adam Machanic: "Re: SELECT tables with rows"
- Previous message: Aaron [SQL Server MVP]: "Re: Table deny modify (row lenght had exceed 8060)"
- In reply to: Philippe [MS]: "Re: SET NOCOUNT ON OPTION"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 19 Oct 2004 09:13:32 -0400
"Philippe [MS]" <ptrotin@online.microsoft.com> wrote in message
news:uPgqYjbtEHA.3460@TK2MSFTNGP15.phx.gbl...
>
> UPDATE ...
> IF @@ROWCOUNT = 0
> BEGIN
> INSERT ...
> END
>
> Therefore, you need to have the NOCOUNT set to OFF
Phil,
@@ROWCOUNT and the NOCOUNT option are mutually exclusive:
CREATE TABLE #abc(def INT)
SET NOCOUNT ON
INSERT #abc (def)
VALUES (1)
SELECT @@ROWCOUNT
- Next message: Adam Machanic: "Re: SELECT tables with rows"
- Previous message: Aaron [SQL Server MVP]: "Re: Table deny modify (row lenght had exceed 8060)"
- In reply to: Philippe [MS]: "Re: SET NOCOUNT ON OPTION"
- Messages sorted by: [ date ] [ thread ]