examples/sql/sudoku.sql
author Alpar Juttner <alpar@cs.elte.hu>
Sun, 05 Dec 2010 17:35:23 +0100
changeset 2 4c8956a7bdf4
permissions -rw-r--r--
Set up CMAKE build environment
alpar@1
     1
CREATE DATABASE glpk;
alpar@1
     2
CREATE USER glpk@localhost IDENTIFIED BY 'gnu';
alpar@1
     3
GRANT ALL PRIVILEGES ON glpk.* TO glpk@localhost;
alpar@1
     4
USE glpk;
alpar@1
     5
DROP TABLE sudoku;
alpar@1
     6
CREATE TABLE sudoku (
alpar@1
     7
  ID   INT ,
alpar@1
     8
  COL  INT ,
alpar@1
     9
  LIN  INT ,
alpar@1
    10
  VAL  INT ,
alpar@1
    11
  PRIMARY KEY ( ID, COL, LIN )
alpar@1
    12
  );
alpar@1
    13
DROP TABLE sudoku_solution;
alpar@1
    14
CREATE TABLE sudoku_solution (
alpar@1
    15
  ID   INT ,
alpar@1
    16
  COL  INT ,
alpar@1
    17
  LIN  INT ,
alpar@1
    18
  VAL  INT ,
alpar@1
    19
  PRIMARY KEY ( ID, COL, LIN )
alpar@1
    20
  );
alpar@1
    21
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 1, 1, 5);
alpar@1
    22
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 1, 2, 0);
alpar@1
    23
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 1, 3, 0);
alpar@1
    24
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 1, 4, 0);
alpar@1
    25
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 1, 5, 4);
alpar@1
    26
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 1, 6, 0);
alpar@1
    27
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 1, 7, 0);
alpar@1
    28
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 1, 8, 0);
alpar@1
    29
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 1, 9, 0);
alpar@1
    30
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 2, 1, 0);
alpar@1
    31
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 2, 2, 0);
alpar@1
    32
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 2, 3, 3);
alpar@1
    33
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 2, 4, 0);
alpar@1
    34
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 2, 5, 0);
alpar@1
    35
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 2, 6, 0);
alpar@1
    36
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 2, 7, 6);
alpar@1
    37
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 2, 8, 2);
alpar@1
    38
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 2, 9, 0);
alpar@1
    39
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 3, 1, 0);
alpar@1
    40
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 3, 2, 0);
alpar@1
    41
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 3, 3, 0);
alpar@1
    42
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 3, 4, 0);
alpar@1
    43
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 3, 5, 0);
alpar@1
    44
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 3, 6, 9);
alpar@1
    45
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 3, 7, 0);
alpar@1
    46
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 3, 8, 0);
alpar@1
    47
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 3, 9, 4);
alpar@1
    48
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 4, 1, 0);
alpar@1
    49
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 4, 2, 0);
alpar@1
    50
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 4, 3, 6);
alpar@1
    51
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 4, 4, 0);
alpar@1
    52
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 4, 5, 0);
alpar@1
    53
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 4, 6, 7);
alpar@1
    54
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 4, 7, 2);
alpar@1
    55
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 4, 8, 0);
alpar@1
    56
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 4, 9, 0);
alpar@1
    57
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 5, 1, 8);
alpar@1
    58
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 5, 2, 1);
alpar@1
    59
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 5, 3, 0);
alpar@1
    60
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 5, 4, 0);
alpar@1
    61
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 5, 5, 0);
alpar@1
    62
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 5, 6, 0);
alpar@1
    63
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 5, 7, 0);
alpar@1
    64
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 5, 8, 4);
alpar@1
    65
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 5, 9, 3);
alpar@1
    66
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 6, 1, 0);
alpar@1
    67
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 6, 2, 0);
alpar@1
    68
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 6, 3, 9);
alpar@1
    69
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 6, 4, 1);
alpar@1
    70
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 6, 5, 0);
alpar@1
    71
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 6, 6, 0);
alpar@1
    72
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 6, 7, 0);
alpar@1
    73
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 6, 8, 0);
alpar@1
    74
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 6, 9, 0);
alpar@1
    75
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 7, 1, 7);
alpar@1
    76
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 7, 2, 0);
alpar@1
    77
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 7, 3, 0);
alpar@1
    78
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 7, 4, 5);
alpar@1
    79
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 7, 5, 0);
alpar@1
    80
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 7, 6, 0);
alpar@1
    81
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 7, 7, 0);
alpar@1
    82
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 7, 8, 0);
alpar@1
    83
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 7, 9, 0);
alpar@1
    84
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 8, 1, 0);
alpar@1
    85
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 8, 2, 9);
alpar@1
    86
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 8, 3, 2);
alpar@1
    87
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 8, 4, 0);
alpar@1
    88
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 8, 5, 0);
alpar@1
    89
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 8, 6, 0);
alpar@1
    90
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 8, 7, 8);
alpar@1
    91
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 8, 8, 0);
alpar@1
    92
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 8, 9, 0);
alpar@1
    93
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 9, 1, 0);
alpar@1
    94
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 9, 2, 0);
alpar@1
    95
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 9, 3, 0);
alpar@1
    96
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 9, 4, 0);
alpar@1
    97
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 9, 5, 3);
alpar@1
    98
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 9, 6, 0);
alpar@1
    99
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 9, 7, 0);
alpar@1
   100
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 9, 8, 0);
alpar@1
   101
INSERT INTO sudoku (ID, COL, LIN, VAL) VALUES (1, 9, 9, 6);