Created
August 30, 2013 17:23
-
-
Save anonymous/6392247 to your computer and use it in GitHub Desktop.
Insert list of id's (SQL)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE Question ( | |
QuestionID INT auto_increment PRIMARY KEY | |
, QuestionText varchar(50) | |
); | |
CREATE TABLE Answer ( | |
AnswerID INT auto_increment PRIMARY KEY | |
, QuestionID INT | |
, AnswerText varchar(50) | |
); | |
INSERT INTO Question ( QuestionText ) | |
VALUES ('Question 1'), ('Question 2'); | |
INSERT INTO Answer ( QuestionID, AnswerText ) | |
VALUES (1, 'Answer 1'), (2, 'Answer 2'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment