C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
.NET
ADO.NET
Android
ASP.NET
C#
Databases & DBA
Design Patterns & Practices
iOS
Java
OOP/OOD
SharePoint
Software Testing
Web Development
WPF
View All
16
Reply
What is the use of @@ROWCOUNT statement?
Rahul Chavan
9y
725
0
Reply
Delete Row
Delete Column
Insert Link
×
Insert
Cancel
Embed YouTube Video
×
Width (%)
Height (%)
Insert
Cancel
Table Options
×
Rows
Columns
First row as header
Create Table
Insert Image
×
Selected file:
Alignment
Left
Center
Right
Select an image from your device to upload
Upload to Server
Cancel
Submit
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.
Rahul Chavan
9y
1
To get the number of rows affected by the latest query that is executed. The @@ sign indicates that it is the system function.
Mukesh Sagar
8y
0
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.
Jothish Kumar
8y
0
@@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.
Awadhesh Jha
8y
0
@@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.
Awadhesh Jha
8y
0
@@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.
Awadhesh Jha
8y
0
@@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.
Awadhesh Jha
8y
0
@@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.
Awadhesh Jha
8y
0
@@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.
Awadhesh Jha
8y
0
@@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.
Awadhesh Jha
8y
0
@@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.
Awadhesh Jha
8y
0
@@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.
Awadhesh Jha
8y
0
@@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.
Awadhesh Jha
8y
0
@@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.
Awadhesh Jha
8y
0
@@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.
Awadhesh Jha
8y
0
we find the how many rows in table
Venka Reddy
8y
0
Can we have trigger on DDL statements?
Write a code in such a way that my SQL connection should be always connected?
Message