15 lines
282 B
MySQL
15 lines
282 B
MySQL
|
CREATE TABLE games (
|
||
|
id INTEGER PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
|
||
|
|
||
|
p1 BPCHAR,
|
||
|
p2 BPCHAR,
|
||
|
|
||
|
p1result BPCHAR,
|
||
|
|
||
|
CONSTRAINT not_self CHECK (p1 != p2),
|
||
|
CONSTRAINT acceptable_result CHECK (p1result = 'W' OR p1result = 'T' OR p1result = 'L')
|
||
|
);
|
||
|
|
||
|
CREATE TABLE players (
|
||
|
name
|
||
|
)
|