Number of Records Inserted or Updated to Variable

  • Is there an easy way to get the number of records inserted or updated from an insert or update sql statement into a variable that can be used within the stored procedure? I was hoping for something similar to the TABLERESULTS option for DBCC commands.

  • select @myvar = @@rowcount

  • Of course. Many thanks,

    JFW

     

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply