Getting no. of rows affected after running select query in SQL Server 2005

后端 未结 4 360
轮回少年
轮回少年 2021-01-18 15:54

Below is my query

select    
@monNameStr as [MName],             
IsNull(count(c.AssignmentID),0),                
IsNull(sum(s.ACV),0),               
IsNu         


        
4条回答
  •  隐瞒了意图╮
    2021-01-18 16:24

    You can just use `@@ROWCOUNT` to get the records affected/returned
    
    DECLARE @rowsreturned INT
    SET @rowsreturned = @@ROWCOUNT
    

提交回复
热议问题