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
SQL SERVER - T-SQL Script for FizzBuzz Logic

SQL SERVER – T-SQL Script for FizzBuzz Logic

February 2, 2009
Pinal Dave
SQL Puzzle
SQL Scripts

FizzBuzz is a common interview puzzle: print 1 to 100, with Fizz for multiples of three and Buzz for five. Here is my T-SQL answer using a WHILE loop.

Read More
SQL SERVER - Email from Blog Reader - Not a Potential Bug in SQL - Puzzle

SQL SERVER – Email from Blog Reader – Not a Potential Bug in SQL – Puzzle

December 13, 2008
Pinal Dave
SQL Puzzle
SQL Error Messages, SQL Scripts, SQL Sub Query

A reader was sure he found a severe bug that causes data discrepancy. Run his script and see why it is not a potential bug in SQL Server at all.

Read More
puzzle

SQL SERVER – Interview Questions – Difficult SQL Puzzle

December 7, 2008
Pinal Dave
SQL Puzzle
Database, SQL Scripts, SQL Server

Today at my organization, we had nearly 30 interviews scheduled of DBA and .NET developers. Let us see a difficult SQL puzzle.

Read More
SQL Server Management Studio query window.

SQL SERVER – Puzzle – Solution – Computed Columns Datatype Explanation

September 29, 2008
Pinal Dave
SQL Puzzle
Database, MVP, SQL Scripts

Solution to the Computed Columns Datatype Explanation puzzle: if a computed column comes out as TINYINT, here is how to create it as INT instead.

Read More
SQL SERVER - Puzzle - Computed Columns Datatype Explanation

SQL SERVER – Puzzle – Computed Columns Datatype Explanation

September 27, 2008
Pinal Dave
SQL Puzzle
MVP, SQL Scripts

Jacob Sebastian explains that SQL Server casts to the data type with the highest precedence. That leads to my puzzle on computed columns datatype.

Read More
SQL SERVER - Simple Puzzle Using Union and Union All - Answer

SQL SERVER – Simple Puzzle Using Union and Union All – Answer

March 25, 2008
Pinal Dave
SQL Puzzle
Database, SQL Joins, SQL Scripts

The answer to yesterday’s Simple Puzzle Using Union and Union All, explained with an image. My UNION vs. UNION ALL article explains why it works.

Read More
SQL SERVER - Simple Puzzle Using Union and Union All

SQL SERVER – Simple Puzzle Using Union and Union All

March 24, 2008
Pinal Dave
SQL Puzzle
SQL Scripts, SQL Utility

A simple puzzle using UNION and UNION ALL: guess the output of two short scripts before you run them. The hint is my article on UNION vs. UNION ALL.

Read More
Previous 1 … 23 24 25 26 27 Next
  • Books
  • Testimonials
  • Privacy Policy

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