The Apprentice: Top 10 list

I got to work with the Apprentice today for just over an hour, and it seemed appropriate for us to go over the Top 10 SQL functions post I put up a few days ago, since he will be using them throughout his career.

We ran several against his registered servers list and went through why you would use them and when.  @@Version to verify servers are up to appropriate SP/CU level, @@Servername to verify all of them are online and responding, etc.

We spent quite a bit of time talking about implicit vs. explicit transactions and looking for issues with DBCC Opentran, including writing our own INSERT and leaving it hanging/uncommitted.  This took us down a fairly interesting rabbit hole.

I think the most fun he had was when he went off and used Cast, GetDate() and DateDiff to mess around with the sample I gave in the original post to figure out how many days old he is, plus how far back he could go with GetDate() – x. (Jan 1, 1753 as it turns out).   When he starts doing things “off-topic” I just sit back and watch 🙂

The second half of the list wasn’t as relevant to him as the first, but then again he’s been doing DBA stuff for total of about a week now.

For each of these we were able to go through at least the basics, which he understood.  And he finally bookmarked my blog 😉

This is fun for both of us.

Thanks for reading!

Kevin3NF

Leave a Comment

Sign up for our Newsletter

%d bloggers like this: