MySQL
- 1 ответ
- 0 вопросов
1
Вклад в тег
CREATE TABLE comment (
CId INT PRIMARY KEY AUTO_INCREMENT,
fQId int(11) NULL,
fAId int(11) NULL,
FOREIGN KEY (fQId) REFERENCES question (QId),
FOREIGN KEY (fAId) REFERENCES answer (AId),
)
select comment from question join answer on QId=fQId join comment on AId=fQAId where QId='value'