Blogs

Dear SQL DBA: Why I Rarely Mention Service Broker

I’ve gotten a few questions about whether I recommend learning Service Broker, and recently I was asked if I’m planning to make any courses on Service Broker.

In this 23 minute episode, I talk about why I personally haven’t become an expert with Broker, the factors that I believe play into Service Broker adoption, and other resources online for learning Service Broker in SQL Server.

Continue reading

The BREAK Keyword in Transact SQL

BREAK is a useful piece of control-of-flow language in SQL Server, but it only works in specific situations. Break Questions, Answers, and Explanations 1) If you run this code in a SQL Server Management Studio session, what will appear in the Messages window? BREAK; PRINT 2; Answer: Msg 135, Level 15, State 1, Line 6 Cannot use a BREAK statement outside the scope of a WHILE statement. How’d people do?

Continue reading

What the Microsoft MVP Award Means to Me in 2018

I recently received my seventh “Most Valuable Professional” award from Microsoft. Oddly, I don’t think I’ve ever written about what this award means to me until this point.

Continue reading

Using RETURN in Transact SQL: Quiz Results

RETURN is a “control of flow” language keyword in Transact-SQL. It’s very useful for managing when code does – and does NOT – get executed in procedural code, and it can also be used to communicate the status from procedural code.

But not everyone knows how to use RETURN, and learning about it can be awkward because of some quirks of SQL Server Management Studio. It is well worth taking the time to get used to it, though!

Continue reading

The Right to Be Erased is Coming to California, Along with Other Privacy Rights

In the last year, developers and DBAs have heard a lot about the General Data Protection Regulation (GDPR) law passed by the European Union. These regulations not only impact companies that are incorporated in Europe, but all companies processing the data of Europeans.

Continue reading

Find the Scalar Function Call: What it Means when it Hides in Probe Residual

User defined functions are fairly simple to create in SQL Server, but figuring out exactly how they are being used can take a little time - even in a simple execution plan. This is because the functions can be tucked away into lots of different operators in the plan, even join operators.

The good news: once you learn what to look for, it’s not terribly complicated. There are some fancy terms involved, but the definitions are pretty simple.

Continue reading

ORDER BY, OFFSET, and Fetch in TSQL

My most recent Quizletter featured a quiz on ORDER BY in TSQL, complete with questions on the OFFSET and FETCH clauses which we got in SQL Server 2012.

One great thing about teaching TSQL School is that it reminds me of these cool options that can be easy to forget.

Continue reading

New Courses: Extended Events, Parallelism, Indexes, and More

It’s been a fun, busy spring and early summer. I have loads of new courses to share, and great stuff is coming up soon!

A big thank you to all the SQLWorkbooks members who attended live events, or posted your comments and questions! Your questions are terrific, and you’ve made these events so much fun.

Continue reading

AVG() in TSQL: Watch Your Data Types

This week’s Quizletter featured a quiz on using the AVG() function in SQL Server.

I was inspired to write this quiz because I’ve been teaching “TSQL School” each week. When we covered aggregate functions, I remembered how tricksy AVG() can be.

Continue reading

Dear SQL DBA: Training Resources for SQL Newbies

New to learning SQL Server? Get the scoop on free online resources to look up information, ask questions of community members, and learn SQL Server from the ground up.

Continue reading