SqlShare.com Logo
 
Skip Navigation Links
Home
Video List
Classes
About Us
Login / Register
Subscribe RSS Feed 

Confio Ignite

Using the @@Rowcount Function

The system function @@Rowcount returns the number of rows affected by the last operation. It's easy to forget that things like SET and PRINT are operations too, and that can change the value that you get. We've got some very short and simple demos that should clarify the behavior and show you how to use it in production code.

Duration:
4 mins 27 secs
Skill Level:
100
Rating:
4.37 out of 5
Publish Date:
January 26, 2010
Using the @@Rowcount Function Watch Video Now  Watch it later!
Bookmark and Share
 
1=Poor, 3=Good, 5=Excellent

About the Author

Image of Andy Warren
Andy Warren is a software trainer focusing on SQL Server, a member of the PASS Board of Directors, and a principal in this site - SQLShare.com.

References

There are no downloads or recommended reading links for this video

Comments
Mick Letofsky on 1/26/2010
Rowcount checks are very useful in conjunction with @@ERROR. Even though an select, insert, update, or delete did not throw an error, not retrieving or affecting any rows could be a problem that the end-user should be aware of during a process.

Don Councill on 1/26/2010
Thanks Andy!

Munna Bhai on 1/26/2010
Another great video...Thanks.

Raman Thatikunta on 1/26/2010
The video quality was a little poor compared to the other ones and it was a tad bit too fast. But, great tips. Thank you.

Lukmaan on 1/26/2010
Video stopped in the middle

Anitha on 1/26/2010
this video is good and clear enough to understand.

Varun on 1/27/2010
fine..

alfred on 1/27/2010
very usefull

achied on 1/28/2010
something small that people like to forget.. Thanks

salvio on 1/28/2010
Very Useful

Steve Harris on 1/29/2010
clear with good examples

FELIX on 1/29/2010
Excellent!

Hari on 1/31/2010
good notes

Fred Fowler on 2/1/2010
As the saying goes, "you learn something new everyday.". I wondered why I would get a 1 when I checked the @@ROWCOUNT after I checked the @@ERROR. Now I know that I should either assign @@ROWCOUNT before any other options or set are done. Thank you.

yeskay on 2/4/2010
good..

32DE12EB89 on 2/6/2010
Good information - thanks



Must Be Logged In
 

How Do I Become a Video Author? |  Newsletter History

Copyright © Fourdeuce, Inc., 2005-2009. All Rights Reserved | Privacy Policy | Terms & Conditions