Get record count for a specific database
This will sum all of the records of a specified database, excluding the 'sysdiagrams' table.
2013-10-23 (first published: 2007-12-17)
19,819 reads
This will sum all of the records of a specified database, excluding the 'sysdiagrams' table.
2013-10-23 (first published: 2007-12-17)
19,819 reads
One of the most common questions asked about SQL Server has to do with the transaction log and why does it grow. James Rea brings us a good explanation here of what happens and what you should do about it.
2010-05-28 (first published: 2009-01-05)
32,716 reads
The transaction log is a fairly complex construct in SQL Server and present in every database installation. New author James Rea brings us a great introduction to how the log works and how to maintain it.
2009-11-06 (first published: 2008-07-02)
40,446 reads
James Rea brings us another great article that shows you how to keep on top of the code that's stored in each of your databases.
2008-07-28
22,668 reads
By Steve Jones
I looked at row_number() in a previous post. Now I want to build on...
Recently I received a cry for help over Teams. The issue was that an...
By davebem
I was the principal author of this SIOS whitepaper, which describes how to build...
Hi - I'm looking for advice regarding the best & quickest way to establish...
Hello. I am looking for a tool Data cleansing/conversion, was recommended HPE any...
I have a query that runs in a job to check on orphaned users....
I have this data in a SQL Server 2022 table:
player yearid team HR Alex Rodriguez 2012 NYY 18 Alex Rodriguez 2013 NYY 7 Alex Rodriguez 2014 NYY NULL Alex Rodriguez 2015 NYY 12 Alex Rodriguez 2016 NYY 9If I run this code, what are the results returned in the hrgrowth column?
SELECT player , yearid , hr , hr - LAG (hr, 1, 0) IGNORE NULLS OVER (ORDER BY yearid) AS hrgrowth FROM dbo.playerstats;See possible answers