Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Solving Sudoku in SQL?

743806Dec 30 2009 — edited Dec 31 2009
Hi. I'm wondering if one could solve a Sudoku puzzle with a SQL query given the initial configuration of the Sudoku is stored in a database table. Suppose I have a database table named InitSudoku storing the initial configuration of a 5x5 Sudoku. Each row in the table indicates which number (1 to 25) is initially placed in which square of the puzzle. For example, the row (15,3,9) means the number 15 is initially placed in the square at the 3rd row and the 9th column of the puzzle. What I would like to get is a result set that would give me a completion of the Sudoku. Does anyone think that is doable strictly within SQL with one or more queries (without using a procedural language like C or Java, which would require coding up an algorithm of solving Sudoku)?

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 28 2010
Added on Dec 30 2009
4 comments
1,339 views