This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
Unmatched guide channels are inspected beside an empty receiving recess.

SQL Puzzle – Unsolved CASE Expression

April 20, 2021
Pinal Dave
SQL Puzzle
SQL CASE, SQL Scripts, SQL Server

This Unsolved CASE puzzle asks you to predict its result before execution. The preceding bitwise challenge drew more than 125 responses.

Read More
Gouache painting: a row of eight wooden window shutters, alternately open and closed, with a mirror row beneath it where every shutter is the opposite; one shutter is painted vermilion

SQL Puzzle – SELECT ~ 1 : Guess the Answer

April 9, 2021
Pinal Dave
SQL Puzzle
SQL Operator, SQL Scripts, SQL Server

SELECT ~ 1 returns -2 because the tilde is the bitwise NOT operator and flips all 32 bits of an int. This post keeps the puzzle, tests the answer on SQL Server 2025 with five data types and shows where the tilde is useful.

Read More
data type

Solve Puzzle about Data type – SQL in Sixty Seconds #108

August 24, 2020
Pinal Dave
SQL Puzzle
SQL Datatype, SQL in Sixty Seconds, SQL Scripts, SQL Server

A very interesting puzzle, where you see the data type conversion in action. I have previously blogged about this puzzle and had received amazing feedback.

Read More
strange results

SQL Puzzle – Solution to Strange Results – IN and IS NOT NULL –

July 10, 2020
Pinal Dave
SQL Puzzle
SQL NULL, SQL Scripts, SQL Server

Earlier I had published a blog post about a puzzle SQL Puzzle – IN and IS NOT NULL – Strange Results. Today we will see a solution to strange results puzzle.

Read More
strange results

SQL Puzzle – IN and IS NOT NULL – Strange Results

June 17, 2020
Pinal Dave
SQL Puzzle
SQL NULL, SQL Scripts, SQL Server

Today, let us see a very simple puzzle where we are getting strange results when using NOT IN and IS NULL in a T-SQL query.

Read More
A fitted drawer belongs to one cabinet while a neighboring cabinet has an empty recess.

SQL Puzzle – Schema and Table Creation – Answer Without Running Code

October 15, 2019
Pinal Dave
SQL Puzzle
Schema, SQL Scripts, SQL Server, SQL Table Operation

This Table Creation puzzle asks for an explanation before you run its code. I suggest examining the batch separators carefully.

Read More
Gouache painting of three garden beds in a row with a hoe whose grip is vermilion

Delete the Wrong Row: A Cheap Answer That Passes the Test

August 8, 2019
Pinal Dave
SQL Puzzle
SQL Delete, SQL Performance, SQL Scripts

A cheap answer to the multiple table delete puzzle reads only 6 pages and passes the check. It can still delete the wrong row. This post shows the answer, asks you to find the row it removes by mistake, and fixes it with a delete that costs 5 reads.

Read More
Previous 1 2 3 4 5 … 22 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com