Projektutvecklingslab/database.sql
2024-02-14 17:50:32 +01:00

14 lines
No EOL
389 B
SQL

// Users
CREATE TABLE Respondants (
name VARCHAR(255) PRIMARY KEY
);
// Answers
CREATE TABLE Answers (
answerOne INT check (answerOne BETWEEN 1 AND 10),
answerTwo INT (answerTwo BETWEEN 1 AND 10),
answerThree INT (answerThree BETWEEN 1 AND 10),
answerFour INT (answerFour BETWEEN 1 AND 10),
name VARCHAR(255),
FOREIGN KEY (name) REFERENCES Respondants(name)
);