Browsing the archives for the system table tag

Column DIFF between two tables

I recently had a situation where I needed to compare table columns between the production table and a test/development table.  Chances are if I needed to do it someone else will to. I like using the EXCEPT SET OPERATOR.  Some people might prefer to use an OUTER JOIN to determine the column differences.  With the […]

How Long Are Your Jobs Running?

Today’s post is going to be short and sweet.  About a year ago I put together a procedure that allows me to see the run times of all of the SQL Agent jobs on a database server.  Some might argue that I got a little carried away when I added the standard deviation and variance […]

0 Comments

Table Row Counts

The easiest way to count the number of rows in a table, from the user perspective, is to use the simple COUNT(*) operator.  A more efficient method to count the number of records in a table is to use SQL Server’s system tables. Let’s start out with the naive approach and see how it performs. […]

Searching for Column Names

How many times a day do you need to find out where a piece of data is stored in a table but don’t have a clue where to look?  If you’ve been working on the same database for the past three years you probably know where everything is. But if you work on multiple schemas, […]

0 Comments