Rahul Chavan
What is the use of @@ROWCOUNT statement?
By Rahul Chavan in Databases & DBA on Apr 07 2016
  • Rahul Chavan
    Apr, 2016 7

    Using @@ROWCOUNT statement you can get the number of rows/ records affected by query execution. It is best practice that whenever you are doing update or delete on table data and if you know affected row count then you should validate that count against @@ROWCOUNT if it is not matching then transaction should be rolled back.

    • 1
  • Mukesh Sagar
    Nov, 2017 17

    To get the number of rows affected by the latest query that is executed. The @@ sign indicates that it is the system function.

    • 0
  • Jothish Kumar
    Sep, 2017 14

    The @@ROW COUNT variable returns the number of rows read by the last executed statement. If any statement does not return any rows, then value of @@ROWCOUNT variable is set to zero.

    • 0
  • Awadhesh Jha
    Aug, 2017 14

    @@rowcount is sql function that returns how many rows affected by query execution. we can also use it when insert data into two tables in single procedures based on first table data insertion.

    • 0
  • Awadhesh Jha
    Aug, 2017 14

    @@rowcount is sql function that returns how many rows affected by query execution. we can also use it when insert data into two tables in single procedures based on first table data insertion.

    • 0
  • Awadhesh Jha
    Aug, 2017 14

    @@rowcount is sql function that returns how many rows affected by query execution. we can also use it when insert data into two tables in single procedures based on first table data insertion.

    • 0
  • Awadhesh Jha
    Aug, 2017 14

    @@rowcount is sql function that returns how many rows affected by query execution. we can also use it when insert data into two tables in single procedures based on first table data insertion.

    • 0
  • Awadhesh Jha
    Aug, 2017 14

    @@rowcount is sql function that returns how many rows affected by query execution. we can also use it when insert data into two tables in single procedures based on first table data insertion.

    • 0
  • Awadhesh Jha
    Aug, 2017 14

    @@rowcount is sql function that returns how many rows affected by query execution. we can also use it when insert data into two tables in single procedures based on first table data insertion.

    • 0
  • Awadhesh Jha
    Aug, 2017 14

    @@rowcount is sql function that returns how many rows affected by query execution. we can also use it when insert data into two tables in single procedures based on first table data insertion.

    • 0
  • Awadhesh Jha
    Aug, 2017 14

    @@rowcount is sql function that returns how many rows affected by query execution. we can also use it when insert data into two tables in single procedures based on first table data insertion.

    • 0
  • Awadhesh Jha
    Aug, 2017 14

    @@rowcount is sql function that returns how many rows affected by query execution. we can also use it when insert data into two tables in single procedures based on first table data insertion.

    • 0
  • Awadhesh Jha
    Aug, 2017 14

    @@rowcount is sql function that returns how many rows affected by query execution. we can also use it when insert data into two tables in single procedures based on first table data insertion.

    • 0
  • Awadhesh Jha
    Aug, 2017 14

    @@rowcount is sql function that returns how many rows affected by query execution. we can also use it when insert data into two tables in single procedures based on first table data insertion.

    • 0
  • Awadhesh Jha
    Aug, 2017 14

    @@rowcount is sql function that returns how many rows affected by query execution. we can also use it when insert data into two tables in single procedures based on first table data insertion.

    • 0
  • Venka Reddy
    Jun, 2017 7

    we find the how many rows in table

    • 0