Not sure where to start with T-SQL Challenges? I am writing monthly posts with T-SQL Challenges and hints to help you get started.
SQL SERVER- IF EXISTS(Select null from table) vs IF EXISTS(Select 1 from table)
Is IF EXISTS(Select null from table) faster than IF EXISTS(Select 1 from table)? A great comment thread by Divya, Brian and Marko answers it.
SQL SERVER – Question – How to Convert Hex to Decimal
An inline function converting Hex to Decimal was slowing a client query. I tuned it, and now I ask readers to share the scripts they use for this.
SQL SERVER – Size of Index Table – A Puzzle to Find Index Size for Each Index on Table
sp_spaceused shows the total index size of a table. My puzzle for you: write a query that adds the size of each index to the sys.indexes list.
SQLAuthority News – First Editorial – T-SQL Challenges Beginners
Welcome to the first editorial for T-SQL Challenges for Beginners, puzzles that make you use your brain cells instead of just reading articles online.
SQL SERVER – Interesting Observation – Execution Plan and Results of Aggregate Concatenation Queries
Reader Bob explains why aggregate concatenation results depend on expression location, using an ANSI point of view, and shares a similar example to run.
SQL SERVER – Interesting Observation – Index on Index View Used in Similar Query
A query on the base table used an index it did not own. It was the index on index view of the same table, an interesting observation from an optimization project.







