SQL Puzzle 5: Prime Magic
Quite a few of you have read or attempted the previous puzzle SQL Puzzle 1: Magic Squares
As a quick reminder, when...
2018-01-05 (first published: 2017-12-19)
1,668 reads
Quite a few of you have read or attempted the previous puzzle SQL Puzzle 1: Magic Squares
As a quick reminder, when...
2018-01-05 (first published: 2017-12-19)
1,668 reads
I’ve been taking a bit of a deep dive into understanding Transparent Data Encryption (TDE). As part of that I’ve...
2017-12-28 (first published: 2017-12-12)
3,188 reads
More and more people are considering some level of encryption against their data stored in SQL Server. In many cases...
2017-12-14 (first published: 2017-12-05)
4,250 reads
I’ve not done a SQL puzzle for a while so thought it was getting overdue…
I set this one for my...
2017-11-24 (first published: 2017-11-08)
1,502 reads
When I was writing my post Capture the most expensive queries across your SQL Server using Query Store a question crossed...
2017-11-16
648 reads
I’m a big fan of using queries based on the dynamic management view sys.dm_exec_query_stats to capture the most resource hungry...
2017-11-13 (first published: 2017-11-01)
5,203 reads
In my post about auditing tools in SQL Server I mentioned a few tools we have at our disposal for...
2017-11-06 (first published: 2017-10-24)
4,859 reads
SQLCMD variables can be a useful way of having changeable parameters for your SQL scripts, allowing you to specify the...
2017-11-01
10,585 reads
Unlike some other languages, T-SQL doesn’t have the concept of a constant.
As good coders, we’ve all at some point tried...
2017-10-19 (first published: 2017-10-10)
3,681 reads
I love the STATISTICS IO and STATISTICS TIME commands. They are such a powerful and easy way to be able...
2017-10-17
514 reads
When I put together the invitation for T-SQL Tuesday #202, I wasn't sure what...
By Steve Jones
My life has some crazy travel stretches for sure. Between speaking, office visits, customer...
In Part 1, we saw how ‘Vamana’ represents vectors as nodes, connects them with...
Comments posted to this topic are about the item Server-Level Table sizes
Comments posted to this topic are about the item Optional Parameter Plan Optimization in...
There is a table tmp_tab:
CREATE TABLE tmp_tab ( id int, val int );
INSERT INTO tmp_tab VALUES (1, 1), (2, NULL), (3, 3), (4, 4), (5, 5);You want to order the rows ids by the following expression:
ISNULL(val, id) + 1Which of the following queries produces the expected ordering and why? (Select all correct) See possible answers