
PUZZLE 66 SUDOKU 263
PUZZLE
66 SUDOKU
I thought that Sudoku, the current puzzle fad, would be a good SQL
programming problem. You start with a 9×9 grid that is further divided
into nine 3×3 regions. Some of the cells will have a digit from 1 to 9 in
them at the start of the puzzle. Your goal is to fill in all the cells with
more digits such that each row, column, and region contains one and
only one instance of each digit.
Strangely, the puzzle appeared in the United States in 1979, then
caught on in Japan in 1986 and became an international fad in 2005.
Most newspapers today carry a daily Sudoku.
How can we do this in SQL? Well we can start by ...