Michael J. Swart

April 29, 2008

Sudoku vs. SQL

Filed under: Tongue In Cheek — Michael J. Swart @ 6:51 am

A while ago, I heard about someone solving Sudoku with SQL. That sounded like a challenge to me. I came up with something that works pretty nicely. I can’t say for sure that it is guaranteed to solve every puzzle, but I haven’t seen it stumped yet. I’ve since updated the file so that when it gets stuck, it plays “what if”. It uses savepoints and rollbacks which work quite well.


  1. […] כאן תגובה! 22/04/2010 עדכון הפוסט: יש פתרון מהיר ומלא משלי https://michaeljswart.com/?p=4. הקוד מסיים תוך שניה פחות או יותר, ומתברר שיש בעיות […]

    Pingback by כיצד פותרים בעיות סודוקו? - גרי רשף — January 19, 2012 @ 11:51 am

  2. […] used SQL to solve Sudoku, print out fractals, and use the spatial results tab to display […]

    Pingback by Michael J. Swart | Data Heads | Data Education SQL Training — March 19, 2012 @ 1:43 am

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress