COIN-OR::LEMON - Graph Library

source: glpk-cmake/examples/sql/sudoku.sql

Last change on this file was 1:c445c931472f, checked in by Alpar Juttner <alpar@…>, 14 years ago

Import glpk-4.45

  • Generated files and doc/notes are removed
File size: 5.1 KB
RevLine 
[1]1CREATE DATABASE glpk;
2CREATE USER glpk@localhost IDENTIFIED BY 'gnu';
3GRANT ALL PRIVILEGES ON glpk.* TO glpk@localhost;
4USE glpk;
5DROP TABLE sudoku;
6CREATE TABLE sudoku (
7  ID   INT ,
8  COL  INT ,
9  LIN  INT ,
10  VAL  INT ,
11  PRIMARY KEY ( ID, COL, LIN )
12  );
13DROP TABLE sudoku_solution;
14CREATE TABLE sudoku_solution (
15  ID   INT ,
16  COL  INT ,
17  LIN  INT ,
18  VAL  INT ,
19  PRIMARY KEY ( ID, COL, LIN )
20  );
21INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 1, 1, 5);
22INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 1, 2, 0);
23INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 1, 3, 0);
24INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 1, 4, 0);
25INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 1, 5, 4);
26INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 1, 6, 0);
27INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 1, 7, 0);
28INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 1, 8, 0);
29INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 1, 9, 0);
30INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 2, 1, 0);
31INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 2, 2, 0);
32INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 2, 3, 3);
33INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 2, 4, 0);
34INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 2, 5, 0);
35INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 2, 6, 0);
36INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 2, 7, 6);
37INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 2, 8, 2);
38INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 2, 9, 0);
39INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 3, 1, 0);
40INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 3, 2, 0);
41INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 3, 3, 0);
42INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 3, 4, 0);
43INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 3, 5, 0);
44INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 3, 6, 9);
45INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 3, 7, 0);
46INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 3, 8, 0);
47INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 3, 9, 4);
48INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 4, 1, 0);
49INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 4, 2, 0);
50INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 4, 3, 6);
51INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 4, 4, 0);
52INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 4, 5, 0);
53INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 4, 6, 7);
54INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 4, 7, 2);
55INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 4, 8, 0);
56INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 4, 9, 0);
57INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 5, 1, 8);
58INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 5, 2, 1);
59INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 5, 3, 0);
60INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 5, 4, 0);
61INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 5, 5, 0);
62INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 5, 6, 0);
63INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 5, 7, 0);
64INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 5, 8, 4);
65INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 5, 9, 3);
66INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 6, 1, 0);
67INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 6, 2, 0);
68INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 6, 3, 9);
69INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 6, 4, 1);
70INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 6, 5, 0);
71INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 6, 6, 0);
72INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 6, 7, 0);
73INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 6, 8, 0);
74INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 6, 9, 0);
75INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 7, 1, 7);
76INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 7, 2, 0);
77INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 7, 3, 0);
78INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 7, 4, 5);
79INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 7, 5, 0);
80INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 7, 6, 0);
81INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 7, 7, 0);
82INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 7, 8, 0);
83INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 7, 9, 0);
84INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 8, 1, 0);
85INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 8, 2, 9);
86INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 8, 3, 2);
87INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 8, 4, 0);
88INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 8, 5, 0);
89INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 8, 6, 0);
90INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 8, 7, 8);
91INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 8, 8, 0);
92INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 8, 9, 0);
93INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 9, 1, 0);
94INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 9, 2, 0);
95INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 9, 3, 0);
96INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 9, 4, 0);
97INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 9, 5, 3);
98INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 9, 6, 0);
99INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 9, 7, 0);
100INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 9, 8, 0);
101INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 9, 9, 6);
Note: See TracBrowser for help on using the repository browser.